Skip to content

Latest commit

 

History

History
39 lines (29 loc) · 1.57 KB

README.md

File metadata and controls

39 lines (29 loc) · 1.57 KB

standard-log-syslog

NPM version NPM downloads

Github NodeJS Codecov

Visual Studio Code

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')