toerr
v0.0.8
Published
error logging
Downloads
2
Readme
ToErr
Application Message Logging
Usage
var ToErr = require("toerr");
var testFacility = new ToErr("TEST");
// You can set the level of debugging, default is 0 which shows only fatal errors
// debug level 5 will show all errors
testFacility.debugLevel=5;
// Pre add your error messaging
testFacility.addMessage( "MessageName", "F", "Example %s %s");
testFacility.log( "MessageName", "Fatal", "Error" );
//output
//[timestamp] TEST-F-MESSAGENAME, Example Fatal Error