0.3.0 • Published 4 years ago

castle-log v0.3.0

Weekly downloads
-
License
BSD
Repository
-
Last release
4 years ago

CasaLogger

Extends Winston Logger

Usage

var log = require('CasaLogger');

// custom options
var options =  {
	sloglvl: 5,					// prevent logging to screen
	floglvl: 1,
	logfn: logFile,
	logdir: logDir,
	maxsize: 1000000
};

log.init(options);
log.info("Server starting up .. ");

To use winston logio

  • Install log.io
npm install -g log.io
  • Run
log.io-server.cmd

Run Tests

  npm test
  • Enable log.io in CasaLogger
var log = require('CasaLogger');

// custom options
var options =  {
	enableLogIO: true,
	logStreamName: 'testStream'
	logOrigin: 'thisPC'
};

log.init(options);
log.info("Server starting up .. ");

Changelog (date / version / user)

2014-11-12 / 0.1.14 - Fixed a file naming bug

2014-11-11 / 0.1.12 & 0.1.13 - Added a panic level to the logger - Allow all messages that get logged as panics to be emailed to admin - Added options: paniclogfn: string - filename where panic logs are written to enableMailing: bool - is panic emailing enabled? mailingList: [] - Array of email address to send panic email to mailingSubject:String - email subject mailingSMTPAddress:String - IP of SMTP server mailingThrottle:number - Send wait period in ms mailingBackBuffer:number - how many lines from the end of the panic log file get sent

2014-10-02 / 0.1.11 - Added a second (default) parameter to the init function. This parameter can be used to set the path where the log folder will be created

2014-06-25 / 0.1.9 - Changed the timestamp function to dump as local time in ISO format

2014-04-08 / 0.1.8 - Fix: Added missing dependencies (deepmerge, winston-logio)

2014-04-07 / 0.1.7 - Added winston-logio support, see updated readme (above) on log.io options

2014-04-02 / 0.1.6 - Console logs timestamp be default

2013-09-09 / 0.1.5 - Changed winston version to 0.7.x

2013-06-20 / 0.1.4 / Heiko - forgot to merge feature-branch changes in previous release (0.1.3)

2013-06-19 / 0.1.3 / Heiko - added README.md - now supports auto log folder creation (added new functionality to winston-filerotatedate plugin) - added tests to verify that auto log folder creation works.