1.0.11 • Published 6 years ago

salak-winston v1.0.11

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

salak-winston

NPM version David deps NPM download

Winston3 for salak

Features

  1. Better Console Formatter
  2. DailyRotateFile

Usage

install

npm install --save salak-winston

example

const winston = require('salak-winston')
const { combine, timestamp, label } = winston.format

const logger = winston.createLogger({
  format: combine(
    label({ label: 'logger' }),
    timestamp()
  ),
  transports: [
    new winston.transports.SalakConsole(),
    new winston.transports.DailyFile({
      filename: 'logger.log',
      dirname: '/tmp',
      dataPattern: 'YYYY-MM-DD'
    })
  ]
})

logger.info('test')

License

MIT

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago