Skip to content

Commit

Permalink
update for formatting consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Berther committed Sep 5, 2019
1 parent 090f7a9 commit a2609db
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ npm install winston-daily-rotate-file
The DailyRotateFile transport can rotate files by minute, hour, day, month, year or weekday. In addition to the options accepted by the logger, `winston-daily-rotate-file` also accepts the following options:

* **frequency:** A string representing the frequency of rotation. This is useful if you want to have timed rotations, as opposed to rotations that happen at specific moments in time. Valid values are '#m' or '#h' (e.g., '5m' or '3h'). Leaving this null relies on `datePattern` for the rotation times. (default: null)
* **datePattern:** A string representing the [moment.js date format](http://momentjs.com/docs/#/displaying/format/) to be used for rotating. 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. (default 'YYYY-MM-DD')
* **zippedArchive:** A boolean to define whether or not to gzip archived log files. (default 'false')
* **datePattern:** A string representing the [moment.js date format](http://momentjs.com/docs/#/displaying/format/) to be used for rotating. 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. (default: 'YYYY-MM-DD')
* **zippedArchive:** A boolean to define whether or not to gzip archived log files. (default: 'false')
* **filename:** Filename to be used to log to. This filename can include the `%DATE%` placeholder which will include the formatted datePattern at that point in the filename. (default: 'winston.log.%DATE%)
* **dirname:** The directory name to save log files to. (default: '.')
* **stream:** Write directly to a custom stream and bypass the rotation capabilities. (default: null)
Expand Down Expand Up @@ -56,10 +56,10 @@ The DailyRotateFile transport can rotate files by minute, hour, day, month, year

This transport emits the following custom events:

* *new*: fired when a new log file is created. This event will pass one parameter to the callback (*newFilename*).
* *rotate*: fired when the log file is rotated. This event will pass two parameters to the callback (*oldFilename*, *newFilename*).
* *archive*: fired when the log file is archived. This event will pass one parameter to the callback (*zipFilename*).
* *logRemoved*: fired when a log file is removed from the file system. This event will pass one parameter to the callback (*removedFilename*).
* **new**: fired when a new log file is created. This event will pass one parameter to the callback (*newFilename*).
* **rotate**: fired when the log file is rotated. This event will pass two parameters to the callback (*oldFilename*, *newFilename*).
* **archive**: fired when the log file is archived. This event will pass one parameter to the callback (*zipFilename*).
* **logRemoved**: fired when a log file is removed from the file system. This event will pass one parameter to the callback (*removedFilename*).

## LICENSE
MIT
Expand Down

0 comments on commit a2609db

Please sign in to comment.