simple-node-logger
Advanced tools
Comparing version 0.93.14 to 0.93.16
#!/usr/bin/env node | ||
var log = require('../lib/SimpleLogger').createSimpleLogger(); | ||
const log = require('../lib/SimpleLogger').createSimpleLogger({level:'info'}); | ||
@@ -5,0 +5,0 @@ log.trace('this is a simple trace log statement (should not show)'); |
@@ -74,3 +74,2 @@ /** | ||
writer = fs.createWriteStream( file, opts ); | ||
// writer.write('\n'); | ||
} | ||
@@ -77,0 +76,0 @@ }; |
@@ -134,3 +134,3 @@ /** | ||
// TODO refactor into configuration delegate to read stats and then process file only if stats change | ||
var callback = function(err, buf) { | ||
const callback = (err, buf) => { | ||
if (err) { | ||
@@ -140,9 +140,9 @@ console.log( err ); | ||
var conf = JSON.parse( buf.toString() ); | ||
const conf = JSON.parse( buf.toString() ); | ||
if (conf.appenders && conf.appenders.length > 0) { | ||
// find each appender and set the level | ||
conf.appenders.forEach(function(app) { | ||
var level = app.level; | ||
const level = app.level; | ||
var appender = dash.find( appenders, function(item) { | ||
const appender = dash.find( appenders, (item) => { | ||
if (item.getTypeName() === app.typeName && app.level) { | ||
@@ -160,3 +160,3 @@ return item; | ||
if (conf.loggers && conf.loggers.length > 0) { | ||
conf.loggers.forEach(function(item) { | ||
conf.loggers.forEach(item => { | ||
if (item.category === 'all') { | ||
@@ -206,4 +206,3 @@ manager.setAllLoggerLevels( item.level ); | ||
var manager = new SimpleLogger(), | ||
opts; | ||
var opts; | ||
@@ -223,2 +222,4 @@ if (!options) { | ||
const manager = new SimpleLogger(opts); | ||
// pass options in to change date formats, etc | ||
@@ -225,0 +226,0 @@ manager.createConsoleAppender( opts ); |
{ | ||
"name": "simple-node-logger", | ||
"version": "0.93.14", | ||
"version": "0.93.16", | ||
"description": "A simple node console and file logger suitable for small, medium and large projects.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -227,2 +227,2 @@ # Simple Node Logger | ||
- - - | ||
<p><small><em>Copyright © 2014-2016, rain city software | Version 0.93.14</em></small></p> | ||
<p><small><em>Copyright © 2014-2016, rain city software | Version 0.93.15</em></small></p> |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
47
108623
1870