# winston-syslog-formatter

> ```javascript import {createSyslogFormatter, levelToSyslog} from 'winston-syslog-formatter' import {createLogger, format, transports} from 'winston'

Latest version **1.5.0** (published 2023-07-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install winston-syslog-formatter
pnpm add winston-syslog-formatter
yarn add winston-syslog-formatter
bun add winston-syslog-formatter
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.5.0 |
| Published | 2023-07-25 |
| First published | 2023-07-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 6.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | mixelburg |
| Maintainers | mixelburg |

## Links

- npm: https://www.npmjs.com/package/winston-syslog-formatter
- Repository: https://github.com/mixelburg/winston-syslog-formatter
- Homepage: https://github.com/mixelburg/winston-syslog-formatter.git
- Issues: https://github.com/mixelburg/winston-syslog-formatter.git
- npm.io page: https://npm.io/package/winston-syslog-formatter

## Dependencies (1)

- [winston](https://npm.io/package/winston.md) ^3.9.0

## Recent versions

- 1.5.0 (latest) — 2023-07-25
- 1.4.0 — 2023-07-25
- 1.3.5 — 2023-07-03
- 1.3.4 — 2023-07-03
- 1.3.3 — 2023-07-03
- 1.3.2 — 2023-07-03
- 1.3.1 — 2023-07-03
- 1.3.0 — 2023-07-03

## README

```javascript
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

```

---
_Source: https://npm.io/package/winston-syslog-formatter · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
