Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow for zero backup - https://github.com/log4js-node/streamroller/pull/74 #1151

Merged
merged 1 commit into from Jan 19, 2022

Commits on Jan 19, 2022

  1. allow for zero backup - in sync with log4js-node/streamroller#74

    **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
    ```
    lamweili committed Jan 19, 2022
    Copy the full SHA
    ac599e4 View commit details
    Browse the repository at this point in the history