Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update examples on the readme #82

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ There are a few required options for logging to Papertrail:
host: 'logs.papertrailapp.com',
port: 12345
})

winstonPapertrail.on('error', function(err) {
// Handle, report, or silently ignore connection errors and failures
});

var logger = new winston.Logger({
var logger = winston.createLogger({
transports: [winstonPapertrail]
});

Expand Down Expand Up @@ -86,7 +86,7 @@ Papertrail:
//
require('winston-papertrail').Papertrail;

var logger = new winston.Logger({
var logger = winston.createLogger({
transports: [
new winston.transports.Papertrail({
host: 'logs.papertrailapp.com',
Expand Down Expand Up @@ -135,7 +135,7 @@ ptTransport.on('connect', function(message) {
logger && logger.info(message);
});

var logger = new winston.Logger({
var logger = winston.createLogger({
levels: {
debug: 0,
info: 1,
Expand All @@ -159,7 +159,7 @@ The `winston-papertrail` transport supports colorization with `winston`. Current
var winston = require('winston'),
Papertrail = require('winston-papertrail').Papertrail;

var logger = new winston.Logger({
var logger = winston.createLogger({
transports: [
new Papertrail({
host: 'logs.papertrailapp.com',
Expand All @@ -185,7 +185,7 @@ pt = new Papertrail({
port: 12345 // your port here
});

var logger = new winston.Logger({
var logger = winston.createLogger({
transports: [ pt ]
});

Expand Down