JSPM

  • Created
  • Published
  • Downloads 901604
  • Score
    100M100P100Q203855F
  • License MIT

A transport for winston which logs to a rotating file each day.

Package Exports

  • winston-daily-rotate-file

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (winston-daily-rotate-file) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

winston-daily-rotate-file

NPM version Build Status Dependency Status

A transport for winston which logs to a rotating file each day.

Usage

  winston.add(require('winston-daily-rotate-file'), options)

The DailyRotateFile transport can rotate files by minute, hour, day, month or year. In addition to the options accepted by the File transport, the Daily Rotate File Transport also accepts the following options:

  • datePattern: A string representing the pattern to be used when appending the date to the filename (default '.yyyy-MM-dd'). The meta characters used in this string will dictate the frequency of the file rotation. For example, if your datePattern is simply '.HH' you will end up with 24 log files that are picked up and appended to every day.
  • prepend: Defines if the rolling time of the log file should be prepended at the begging of the filename (default false)

Valid meta characters in the datePattern are:

  • yy: Last two digits of the year.
  • yyyy: Full year.
  • M: The month.
  • MM: The zero padded month.
  • d: The day.
  • dd: The zero padded day.
  • H: The hour.
  • HH: The zero padded hour.
  • m: The minute.
  • mm: The zero padded minute.

Metadata: Logged via util.inspect(meta);

LICENSE

MIT

AUTHOR: Charlie Robbins
MAINTAINER: Matt Berther