From b75152e720a7da39c59d20eed8c2eb7a4e409ad4 Mon Sep 17 00:00:00 2001 From: Matias De Carli Date: Fri, 17 Aug 2018 17:59:23 -0700 Subject: [PATCH] update examples on the readme --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 9060815..1918c55 100644 --- a/README.md +++ b/README.md @@ -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] }); @@ -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', @@ -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, @@ -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', @@ -185,7 +185,7 @@ pt = new Papertrail({ port: 12345 // your port here }); -var logger = new winston.Logger({ +var logger = winston.createLogger({ transports: [ pt ] });