Skip to content

Commit

Permalink
docs: update rotating-file-stream usage for 2.x
Browse files Browse the repository at this point in the history
fixes #217
closes #218
  • Loading branch information
Allanbikundo authored and dougwilson committed Mar 18, 2020
1 parent c54194c commit 5d8176f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -314,12 +314,12 @@ file per day in the `log/` directory using the
var express = require('express')
var morgan = require('morgan')
var path = require('path')
var rfs = require('rotating-file-stream')
var rfs = require('rotating-file-stream') // version 2.x

var app = express()

// create a rotating write stream
var accessLogStream = rfs('access.log', {
var accessLogStream = rfs.createStream('access.log', {
interval: '1d', // rotate daily
path: path.join(__dirname, 'log')
})
Expand Down

0 comments on commit 5d8176f

Please sign in to comment.