1.0.2 • Published 6 years ago

@barrygee/nodelogger v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
6 years ago

NodeLogger

A custom logger for Node.js

Available fields

{
	"level": String: (0-4) this is converted to TRACE, DEBUG, INFO, WARN, ERROR
	"serviceName": String,
	"uuid": String,
	"class": String,
	"function": String,
	"message": String
}

Example log object containing specified values:

logger.log({ level: '3', serviceName: 'some-service-name', uuid: '12341234-UUID-UUID-123412341234', class: 'a-js-class.js' function: 'someFunction()', message: 'A message' })

Outputs:

2018-10-11T06:48:13.166Z WARN some-service-name 12341234-UUID-UUID-123412341234 a-js-class.js someFunction() A message

Missing fields will be populated with the default values specified in logger.config.json.

Log object containing default values specified in logger.config.json:

logger.log()
1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago