https://github.com/benpptung/rotatelog-stream
Writable Stream rotating files when the file reach a threshold size
https://github.com/benpptung/rotatelog-stream
logging rotatelog-stream stream
Last synced: about 1 year ago
JSON representation
Writable Stream rotating files when the file reach a threshold size
- Host: GitHub
- URL: https://github.com/benpptung/rotatelog-stream
- Owner: benpptung
- Created: 2016-01-28T11:06:01.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-08-06T03:00:25.000Z (almost 9 years ago)
- Last Synced: 2025-06-05T04:48:28.560Z (about 1 year ago)
- Topics: logging, rotatelog-stream, stream
- Language: JavaScript
- Size: 6.84 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rotatelog-stream
A Writable Stream for rotating logs.
## example
const join = require('path').join;
const RotateLog = require('rotatelog-stream');
var stream = RotateLog(join(__dirname, 'log'), { maxsize: 1024 * 1024, keep: 5});
or
var join = require('path').join;
var RotateLog = require('rotatelog-stream');
var stream = RotateLog({
path: join(__dirname, 'log'),
maxsize: 1024 * 1024 * 5,
keep: 10
});
## options
- `path`: the log path
- `maxsize`: max file size, default: 1024 * 1024 * 5
- `keep`: the number of log files limitation, default: 5; `0` means no limitation