logginator
Advanced tools
Comparing version 1.1.0 to 1.1.1
13
index.js
@@ -16,4 +16,13 @@ var path = require('path'); | ||
module.exports = function () { | ||
var winstonLogger = new (winston.Logger)({ transports: [ new TaggedConsoleTarget() ] }); | ||
module.exports = function (config) { | ||
var winstonConfig = {}; | ||
if (config) { | ||
// Currently no config format to understand. | ||
} else { | ||
// Default to console output if no config specified. | ||
winstonConfig = { transports: [ new TaggedConsoleTarget() ] }; | ||
} | ||
var winstonLogger = new (winston.Logger)(winstonConfig); | ||
var log = new TaggedLogger(winstonLogger, []); | ||
@@ -20,0 +29,0 @@ |
{ | ||
"name": "logginator", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Creates an instance of TaggedLogger", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -9,3 +9,12 @@ Installation | ||
var log = require('logginator')(); | ||
var log = require('logginator')(config); | ||
log.info("I am a log message"); | ||
Config | ||
====== | ||
Optional. If left empty, will default to console output. | ||
If specified, is assumed to define where the output will go. This is currently not | ||
defined, so the only valid value is `{}`, which results in no output. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
1681
26
20
0