Comparing version 1.0.3 to 1.0.4
@@ -11,3 +11,3 @@ 'use strict' | ||
levels[level] = Utils.level(level) | ||
return new winston.Logger({ | ||
return new (winston.Logger)({ | ||
levels: levels, | ||
@@ -14,0 +14,0 @@ transports: transports |
'use strict' | ||
const winston = require('winston') | ||
require('winston-syslog').Syslog | ||
require('winston-loggly') | ||
@@ -11,3 +11,2 @@ const formatter = require('./formatter') | ||
if (!config) return [] | ||
var transports = config.transports | ||
@@ -22,16 +21,12 @@ var keys = Object.keys(transports) | ||
Object.assign(options, formatter) | ||
if (lvl.indexOf(level) > -1) { | ||
switch (transport) { | ||
case 'console': | ||
Object.assign(options, formatter) | ||
options.silent = (options.silent != null) ? options.silent : (process.env.NODE_ENV === 'test') | ||
transportsArray.push(new (winston.transports.Console)(options)) | ||
break | ||
case 'file': | ||
transportsArray.push(new (winston.transports.File)(options)) | ||
case 'loggly': | ||
transportsArray.push( new (winston.transports.Loggly)( options ) ) | ||
break | ||
case 'syslog': | ||
transportsArray.push(new (winston.transports.Syslog)(options)) | ||
break | ||
} | ||
@@ -38,0 +33,0 @@ } |
{ | ||
"name": "@c8/logger", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Easy to use (config-based) wrapper around winston logger", | ||
@@ -36,14 +36,16 @@ "main": "index.js", | ||
"chai": "^3.5.0", | ||
"code": "^2.2.0", | ||
"express": "^4.13.4", | ||
"istanbul": "^0.4.3", | ||
"mocha": "^2.4.5", | ||
"standard": "^6.0.8", | ||
"supertest": "^1.2.0", | ||
"code": "^4.0.0", | ||
"express": "^4.14.0", | ||
"istanbul": "^0.4.5", | ||
"mocha": "^3.1.2", | ||
"standard": "^8.5.0", | ||
"supertest": "^2.0.1", | ||
"test-console": "^1.0.0" | ||
}, | ||
"dependencies": { | ||
"winston": "^2.2.0", | ||
"winston-syslog": "^1.2.1" | ||
"assign.js": "^2.3.1", | ||
"winston": "^2.3.0", | ||
"winston-loggly": "^1.3.1", | ||
"winston-syslog": "^1.2.4" | ||
} | ||
} |
@@ -13,2 +13,10 @@ /* eslint-env mocha */ | ||
level: [Levels.INFO, Levels.DEBUG] | ||
}, | ||
loggly: { | ||
token: 'c627e174-89ef-4743-a949-28616c69c682', | ||
domain: 'c8management', | ||
env: 'INT', | ||
level: 'info', | ||
productName: 'logger', | ||
serviceName: 'mocha' | ||
} | ||
@@ -15,0 +23,0 @@ } |
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
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
23863
22
678
4
1
+ Addedassign.js@^2.3.1
+ Addedwinston-loggly@^1.3.1
+ Addedansi-regex@2.1.1(transitive)
+ Addedansi-styles@2.2.1(transitive)
+ Addedasn1@0.2.6(transitive)
+ Addedassert-plus@0.2.01.0.0(transitive)
+ Addedassign.js@2.8.14(transitive)
+ Addedasynckit@0.4.0(transitive)
+ Addedaws-sign2@0.6.0(transitive)
+ Addedaws4@1.13.2(transitive)
+ Addedbcrypt-pbkdf@1.0.2(transitive)
+ Addedbl@1.1.2(transitive)
+ Addedboom@2.10.1(transitive)
+ Addedcaseless@0.11.0(transitive)
+ Addedchalk@1.1.3(transitive)
+ Addedcombined-stream@1.0.8(transitive)
+ Addedcommander@2.20.3(transitive)
+ Addedcore-util-is@1.0.21.0.3(transitive)
+ Addedcryptiles@2.0.5(transitive)
+ Addeddashdash@1.14.1(transitive)
+ Addeddelayed-stream@1.0.0(transitive)
+ Addedecc-jsbn@0.1.2(transitive)
+ Addedescape-string-regexp@1.0.5(transitive)
+ Addedextend@3.0.2(transitive)
+ Addedextsprintf@1.3.0(transitive)
+ Addedforever-agent@0.6.1(transitive)
+ Addedform-data@2.0.0(transitive)
+ Addedgenerate-function@2.3.1(transitive)
+ Addedgenerate-object-property@1.2.0(transitive)
+ Addedgetpass@0.1.7(transitive)
+ Addedhar-validator@2.0.6(transitive)
+ Addedhas-ansi@2.0.0(transitive)
+ Addedhawk@3.1.3(transitive)
+ Addedhoek@2.16.3(transitive)
+ Addedhttp-signature@1.1.1(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedis-my-ip-valid@1.0.1(transitive)
+ Addedis-my-json-valid@2.20.6(transitive)
+ Addedis-property@1.0.2(transitive)
+ Addedis-typedarray@1.0.0(transitive)
+ Addedisa.js@2.2.18(transitive)
+ Addedisarray@1.0.0(transitive)
+ Addedjsbn@0.1.1(transitive)
+ Addedjson-schema@0.4.0(transitive)
+ Addedjson-stringify-safe@5.0.1(transitive)
+ Addedjsonpointer@5.0.1(transitive)
+ Addedjsprim@1.4.2(transitive)
+ Addedloggly@1.1.1(transitive)
+ Addedmime-db@1.52.0(transitive)
+ Addedmime-types@2.1.35(transitive)
+ Addednode-uuid@1.4.8(transitive)
+ Addedoauth-sign@0.8.2(transitive)
+ Addedpinkie@2.0.4(transitive)
+ Addedpinkie-promise@2.0.1(transitive)
+ Addedprocess-nextick-args@1.0.7(transitive)
+ Addedpunycode@1.4.1(transitive)
+ Addedqs@6.2.4(transitive)
+ Addedreadable-stream@2.0.6(transitive)
+ Addedrequest@2.75.0(transitive)
+ Addedsafer-buffer@2.1.2(transitive)
+ Addedsntp@1.0.9(transitive)
+ Addedsshpk@1.18.0(transitive)
+ Addedstring_decoder@0.10.31(transitive)
+ Addedstringstream@0.0.6(transitive)
+ Addedstrip-ansi@3.0.1(transitive)
+ Addedsupports-color@2.0.0(transitive)
+ Addedtimespan@2.3.0(transitive)
+ Addedtough-cookie@2.3.4(transitive)
+ Addedtunnel-agent@0.4.3(transitive)
+ Addedtweetnacl@0.14.5(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
+ Addedverror@1.10.0(transitive)
+ Addedwinston-loggly@1.3.1(transitive)
+ Addedxtend@4.0.2(transitive)
Updatedwinston@^2.3.0
Updatedwinston-syslog@^1.2.4