@tadashi/graylog
v1.1.0
Published
Send logs to graylog
Downloads
1
Maintainers
Readme
@tadashi/graylog
Publishing application logs to Graylog.
Install
$ npm i -S @tadashi/graylog
API
Environment variables available
- TADASHI_GRAYLOG = 1
createLogger(name, [options]): Logger
Type: Logger
name
Type: string
The log's name.
options
Type: object
Default: {}
See the options here:
https://github.com/deepal/node-gelfy#gelfycreateoptions
Usage
import createLogger from '@tadashi/graylog'
const logger = createLogger('example', {
host: '127.0.0.1'
})
logger.on('error', () => {
process.stderr.write('error...')
})
logger.info({
message: 'Show the info',
custom_prop: '...'
})
License
MIT © Thiago Lagden