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

pm2-logrotate

Package Overview
Dependencies
Maintainers
2
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pm2-logrotate

PM2 module to automatically rotate logs of processes managed by PM2.

  • 1.0.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
47K
decreased by-21.31%
Maintainers
2
Weekly downloads
 
Created
Source

Description

PM2 module to automatically rotate logs of processes managed by PM2.

Install

pm2 install pm2-logrotate

Configure

There are 3 values that you need to configure :

  • max_size (Defaults to 10MB): When a file size becomes higher than this value it will split it.
  • interval (Defaults to 1):
  • interval_unit (Defaults to 'DD'): interval and interval_unit works together, it means if you have interval_unit='DD' and interval=3, it will split the logs every 3 days.
  • retain (Defaults to all): This number is the number of rotated logs that are keep at any one time, it means that if you have retain = 7 you will have at most 7 rotated logs and your current one.

Possible values for interval_unit are 'MM' (months), 'DD' (days), 'mm' (minutes). eg: interval:9, interval_unit:'mm' will split the logs every 9 minutes.

How to set these values ?

  • After having installed the module you have to type : pm2 set pm2-logrotate:<param> <value>

e.g: pm2 set pm2-logrotate:max_size 1024 (1KB) pm2 set pm2-logrotate:interval_unit 'MM' (Months)

FAQs

Package last updated on 28 Jul 2015

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