hf-node-logger
Laser Fox Logger Module for Node
Installation
simple installation
npm install hf-node-logger
require it in your file
var logger = ;
Loglevel
There are multiple loglevel:
- debug
For debugging information 2. info
For the 'normal' stream of events 3. warning
For things which are uncritical but someone should have a look 4. severe
For things that should not happen 5. critical
For things that are breaking the System
configuration
Require the module and define your loglevel.
var config = stdOut : consolelog errOut : consoleerror level : DEBUG name : 'AppLog' ;
and call the initializer which is returned by the require statement
var logger = config;
If you don't specify any, the default loglevel is 'info'.
usage
generic use:
logger;
result:
<TIMESTAMP> | <NAME> | <LOGLEVEL> | <LOGTEXT>
Shortcuts
There are specified shortcuts for every loglevel:
debug
logger;
info
logger;
warning
logger;
severe
logger;
critical
logger;