standard-log-syslog
v12.1.2
Published
syslog plugin for `standard-log`
Downloads
21
Readme
standard-log-syslog
syslog plugin for standard-log
Usage
Typeically, you can create a reporter the logs to a file or to another service. Here, we do an example with the built-in console log reporter.
import { createSyslogFormatter } from 'standard-log-syslog'
import { createStandardLog, createConsoleLogReporter } from 'standard-log'
const reporter = createConsoleLogReporter({ formatter: createSyslogFormatter() })
const standardLog = createStandardLog({ reporters: [reporter] })
const log = standardLog.getLogger('some logger')
log.info('some log')