Skip to content

Commit

Permalink
[refactor breaking] Remove DailyRotateFile from winston core into…
Browse files Browse the repository at this point in the history
… `winstonjs/winston-daily-rotate-file`.
  • Loading branch information
indexzero committed Oct 9, 2015
1 parent 6a3907c commit 0f82204
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 708 deletions.
28 changes: 0 additions & 28 deletions docs/transports.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ There are several [core transports](#winston-core) included in `winston`, which
* **[Winston Core](#winston-core)**
* [Console](#console-transport)
* [File](#file-transport)
* [DailyRotateFile](#dailyrotatefile-transport)
* [Http](#http-transport)

* **[Winston More](#winston-more)**
Expand Down Expand Up @@ -35,7 +34,6 @@ There are several core transports included in `winston`, which leverage the buil

* [Console](#console-transport)
* [File](#file-transport)
* [DailyRotateFile](#dailyrotatefile-transport)
* [Http](#http-transport)

### Console Transport
Expand Down Expand Up @@ -90,32 +88,6 @@ The File transport should really be the 'Stream' transport since it will accept

*Metadata:* Logged via util.inspect(meta);


### DailyRotateFile Transport

``` js
winston.add(winston.transports.DailyRotateFile, options)
```

The DailyRotateFile transport can rotate files by minute, hour, day, month or year. Its options are identical to the File transport with the lone addition of the 'datePattern' option:

* __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.

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);

### Http Transport

``` js
Expand Down
Loading

0 comments on commit 0f82204

Please sign in to comment.