Skip to content

Instantly share code, notes, and snippets.

@dmukhg
Created January 5, 2016 04:16
Show Gist options
  • Select an option

  • Save dmukhg/b89c6d2c1771754730a2 to your computer and use it in GitHub Desktop.

Select an option

Save dmukhg/b89c6d2c1771754730a2 to your computer and use it in GitHub Desktop.

Revisions

  1. dmukhg created this gist Jan 5, 2016.
    11 changes: 11 additions & 0 deletions winston-bootstrap.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    var config = require('config');
    var winstonConfig = require('winston-config');

    winstonConfig.fromJson(config.get('logging'), function (err, winston) {
    // Handle error

    var SomeService = require('./SomeService');

    var logger = winston.loggers.get('protocol');
    logger.info('Started application');
    }