mirror of
https://github.com/log4js-node/log4js-node.git
synced 2025-12-08 19:26:01 +00:00
**Important**
It is also to note the file does not roll within itself (truncate its older entry for newer entry).
It truncates all and appends only the new entry.
```javascript
var rollers = require('streamroller');
var stream = new rollers.RollingFileStream('myfile', 6, 0);
stream.write("abc"); // add as first row
stream.write("def"); // add as second row
stream.write("ghi"); // truncate all and add as first row
stream.end();
```
Output:
```
myfile - ghi
```