Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

log-rotate

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

log-rotate

Rotate log files with ease

  • 0.2.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
10K
increased by4.66%
Maintainers
1
Weekly downloads
 
Created
Source

log-rotate

Rotate a log similar to the way linux logrotate does, appending and updating .NUM indexes as you go.

Build Status
NPM

Example

var rotate = require('log-rotate');
  
// move a log file while incrementing existing indexed / rotated logs
rotate('./test.log', function(err) {
  // ls ./ => test.log test.log.0
});

options

count

Limit the number of rotated files to count

var rotate = require('log-rotate');

rotate('./test.log', { count: 3 }, function(err) {
  // ls ./ => test.log test.log.0 test.log.1
});

compress

Compress rotated files with gzip

install

With npm do:

npm install log-rotate

Keywords

FAQs

Package last updated on 20 Apr 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc