Skip to content

Regular cleanup service log,every time the Module service is started PM2 module to automatically clear logs

Notifications You must be signed in to change notification settings

YeahPotato/pm2-log-schedule

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Description:

Regular cleanup service log,every time the Module service is started

PM2 module to automatically clear logs

pm2-log-schedule

Install

$ npm install pm2 -g

$ pm2 install pm2-log-schedule

Configuration

  • maxLogs (Defaults to 10) The maximum number of logs in your server log directory
  • logPath (Defaults to /home/web/logs) Define log path on the server
  • pattern (Defaults to \\d{4}-\\d{2}-\\d{2}\\.log) Log name that needs to be extracted
  • interval (Defaults to 7) leaning the cycle of the log

How to set these values ?

e.g:

  • pm2 set pm2-log-schedule:interval 10 (Interval 7 days)

Uninstall

$ pm2 uninstall pm2-log-schedule

License

MIT

About

Regular cleanup service log,every time the Module service is started PM2 module to automatically clear logs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published