0.3.4 • Published 7 years ago

node-logservice-db-file-console v0.3.4

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

node-logservice-db-file-console

Service for logging in nodejs projects

Build Status npm version Downloads/month dependencies Status devDependencies Status Coverage Status GitHub license GitHub issues Greenkeeper badge

Configurable to log via winston-mongodb to database, via winston to files and/or to console.

TODO

  • Integrate base console logging
  • Integrate base file logging
  • Integrate base mongodb logging
  • Implement custom configuration
  • Write tests
  • Write documentation

Install

npm install node-logservice-db-file-console --save

Usage

var log = require('node-logservice-db-file-console')(configObject);

// change custom config globally in project
log.reinit(configObject);

// log events
log.logConsole('debug text message', 'debug', '[TEST]', 'client');
log.logConsole('info text message', 'info', '[TEST]', 'client');
log.logConsole('warn text message', 'warn', '[TEST]', 'client');
log.logConsole('error text message', 'error', '[TEST]', 'client');
log.logConsole('exception text message', 'exception', '[TEST]', 'client');
log.debug('debug text message', '[TEST]', 'client');
log.info('info text message', '[TEST]', 'client');
log.warn('warn text message', '[TEST]', 'client');
log.error('error text message', '[TEST]', 'client');
log.exception('exception text message', '[TEST]', 'client');

Example Output

Example Output

Tests

npm test

Contributing

Feel free and contribute

Release History

  • 0.3.4 Updated Readme and Dependencies
  • 0.3.3 Updated Readme and Dependencies
  • 0.3.0 File logging
  • 0.2.0 Console logging
  • 0.0.1 Initial release
0.3.4

7 years ago

0.3.2

8 years ago

0.3.1

8 years ago

0.3.0

8 years ago

0.2.0

8 years ago

0.2.0-SNAPSHOT

8 years ago