1.5.0 • Published 10 months ago

winston-syslog-formatter v1.5.0

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago
import {createSyslogFormatter, levelToSyslog} from 'winston-syslog-formatter'
import {createLogger, format, transports} from 'winston'

const LOG_LEVEL = process.env.LOG_LEVEL || 'debug'
const APP_NAME = process.env.APP_NAME || 'app'
const HOST = process.env.HOST || 'death-star'

const logger = createLogger({
    levels: levelToSyslog,
    level: LOG_LEVEL,

    format: format.combine(
        format.colorize({message: true}),
        createSyslogFormatter({
            facility: 20,
            appName: APP_NAME,
            host: HOST,
            verion: '1',
            procId: process.pid,
        }),
    ),
    transports: [new transports.Console()],
})

export default logger
1.5.0

10 months ago

1.4.0

10 months ago

1.3.5

11 months ago

1.3.4

11 months ago

1.3.3

11 months ago

1.3.2

11 months ago

1.3.1

11 months ago

1.3.0

11 months ago

1.2.2

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago