Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@jessety/pm2-logrotate
Advanced tools
Readme
NOTE: This is a fork of pm2-logrotate, which is (currently) unmaintained. It fixes a critical issue that prevented any log files from being deleted on Windows, which was affecting pm2-installer.
PM2 module to automatically rotate logs of processes managed by PM2.
pm2 install @jessety/pm2-logrotate
NOTE: the command is pm2 install
NOT npm install
max_size
(Defaults to 10M
): When a file size becomes higher than this value it will rotate it (its possible that the worker check the file after it actually pass the limit) . You can specify the unit at then end: 10G
, 10M
, 10K
retain
(Defaults to 30
file logs): 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.compress
(Defaults to false
): Enable compression via gzip for all rotated logsdateFormat
(Defaults to YYYY-MM-DD_HH-mm-ss
) : Format of the data used the name the file of logrotateModule
(Defaults to true
) : Rotate the log of pm2's module like other appsworkerInterval
(Defaults to 30
in secs) : You can control at which interval the worker is checking the log's size (minimum is 1
)rotateInterval
(Defaults to 0 0 * * *
everyday at midnight): This cron is used to a force rotate when executed.
We are using node-schedule to schedule cron, so all valid cron for node-schedule is valid cron for this option. Cron style :TZ
(Defaults to system time): This is the standard tz database timezone used to offset the log file saved. For instance, a value of Etc/GMT+1
, with an hourly log, will save a file at hour 14
GMT with hour 13
(GMT+1) in the log name.* * * * * *
┬ ┬ ┬ ┬ ┬ ┬
│ │ │ │ │ |
│ │ │ │ │ └ day of week (0 - 7) (0 or 7 is Sun)
│ │ │ │ └───── month (1 - 12)
│ │ │ └────────── day of month (1 - 31)
│ │ └─────────────── hour (0 - 23)
│ └──────────────────── minute (0 - 59)
└───────────────────────── second (0 - 59, OPTIONAL)
After having installed the module you have to type :
pm2 set pm2-logrotate:<param> <value>
e.g:
pm2 set pm2-logrotate:max_size 1K
(1KB)pm2 set pm2-logrotate:compress true
(compress logs when rotated)pm2 set pm2-logrotate:rotateInterval '*/1 * * * *'
(force rotate every minute)FAQs
PM2 module that rotates application logs
The npm package @jessety/pm2-logrotate receives a total of 481 weekly downloads. As such, @jessety/pm2-logrotate popularity was classified as not popular.
We found that @jessety/pm2-logrotate demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.