Skip to content

A node.js logger that outputs the filename and line number of where the logger is called

License

Notifications You must be signed in to change notification settings

Portchain/logacious

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logacious

Logger with line numbers that can also send logs to syslog.

Example of the output:

[INFO] 2018-01-23 07:38:24.946 lib/migrations.js:25 "Migration successful"
[INFO] 2018-01-23 07:38:24.948 lib/cluster.js:59 "All initialization function successful."
[INFO] 2018-01-23 07:38:24.949 lib/cluster.js:65 "Starting workers" 3

Usage

const logger = require('logacious')()

logger.log('foo', new Error(), object)
logger.info('foo', new Error(), object)
logger.warn('foo', new Error(), object)
logger.error('foo', new Error(), object)

Environment variables

About

A node.js logger that outputs the filename and line number of where the logger is called

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •