simple-node-logger
Advanced tools
Comparing version 0.93.18 to 0.93.19
@@ -27,1 +27,5 @@ #!/usr/bin/env node | ||
var loggers = manager.getLoggers(); | ||
loggers.forEach(logger => { | ||
console.log('stats: ', logger.getCategory(), logger.getStats()); | ||
}); |
@@ -134,2 +134,16 @@ /** | ||
/** | ||
* return the category name | ||
*/ | ||
this.getCategory = function() { | ||
return category; | ||
}; | ||
/** | ||
* return the domain name | ||
*/ | ||
this.getDomain = function() { | ||
return domain; | ||
}; | ||
// now initialize the methods for the standard levels | ||
@@ -136,0 +150,0 @@ const init = function() { |
{ | ||
"name": "simple-node-logger", | ||
"version": "0.93.18", | ||
"version": "0.93.19", | ||
"description": "A simple node console and file logger suitable for small, medium and large projects.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
# Simple Node Logger | ||
- - - | ||
``` | ||
__ _ _ __ _ __ | ||
/ _(_)_ __ ___ _ __ | | ___ /\ \ \___ __| | ___ / / ___ __ _ __ _ ___ _ __ | ||
\ \| | '_ ` _ \| '_ \| |/ _ \ / \/ / _ \ / _` |/ _ \ / / / _ \ / _` |/ _` |/ _ \ '__| | ||
_\ \ | | | | | | |_) | | __/ / /\ / (_) | (_| | __/ / /__| (_) | (_| | (_| | __/ | | ||
\__/_|_| |_| |_| .__/|_|\___| \_\ \/ \___/ \__,_|\___| \____/\___/ \__, |\__, |\___|_| | ||
|_| |___/ |___/ | ||
``` | ||
@@ -14,2 +21,3 @@ [![NPM version](https://badge.fury.io/js/simple-node-logger.svg)](http://badge.fury.io/js/simple-node-logger) [![Build Status](https://travis-ci.org/darrylwest/simple-node-logger.svg?branch=master)](https://travis-ci.org/darrylwest/simple-node-logger) [![Dependency Status](https://david-dm.org/darrylwest/simple-node-logger.svg)](https://david-dm.org/darrylwest/simple-node-logger) | ||
- overridable format methods in base appender | ||
- stats that track counts of all log statements including warn, error, etc | ||
@@ -199,2 +207,3 @@ ## Installation | ||
## Tests | ||
@@ -229,2 +238,2 @@ | ||
- - - | ||
<p><small><em>Copyright © 2014-2017, rain city software | Version 0.93.18</em></small></p> | ||
<p><small><em>Copyright © 2014-2017, rain city software | Version 0.93.19</em></small></p> |
@@ -17,3 +17,3 @@ /** | ||
const createOptions = function() { | ||
var opts = {}; | ||
const opts = {}; | ||
@@ -27,3 +27,3 @@ opts.category = 'MyCat'; | ||
describe('#instance', function() { | ||
var logger = new Logger( createOptions() ), | ||
const logger = new Logger( createOptions() ), | ||
methods = [ | ||
@@ -40,2 +40,4 @@ 'log', | ||
'isInfo', | ||
'getCategory', | ||
'getDomain', | ||
'getStats', | ||
@@ -63,2 +65,6 @@ '__protected' | ||
}); | ||
it('should have a category', function() { | ||
logger.getCategory().should.equal('MyCat'); | ||
}); | ||
}); | ||
@@ -91,2 +97,4 @@ | ||
}); | ||
logger.getDomain().should.equal(opts.domain); | ||
}); | ||
@@ -164,2 +172,5 @@ | ||
}); | ||
describe('stats', function() { | ||
it('should report stats with counts for each level', function() { | ||
@@ -166,0 +177,0 @@ const log = new Logger( createOptions() ); |
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
119454
1920
237