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

Add support for only ProSpamFilter debug logging with log rotation #9

Open
ashleyse2016 opened this issue Feb 17, 2017 · 2 comments
Open

Comments

@ashleyse2016
Copy link
Contributor

Often its good to have the debug logging on however as this is a very verbose type of log, its not viable to keep running a long time. This is specially relevant when you are looking for hard to trigger issues.

It would be great if there was a way to simply enable "logging" of the addon, and this logged only the "ProSpamFilter" logging (and not every thing else found in /var/log/debug), and was able to then log-rotate the files every day. (with a possible expiry). This way, logging can be enabled for multiple days/week.

@ashleyse2016
Copy link
Contributor Author

ashleyse2016 commented May 3, 2017

Looks like you can actually already set this to rotate

1: type touch /etc/prospamfilter/debug
2: add the following to rsyslog.conf

##SpamExperts debug logging##
*.debug                         /usr/local/cpanel/logs/ProSpam.log

3: type /etc/init.d/rsyslog restart
4: Go to Home »Service Configuration »cPanel Log Rotation Configuration in WHM
5: Tick ProSpam.log
6: Click Save

This doesn't extract only the ProSpamFilter lines, but likely thats possible with Property-based filtering with rsyslog. Will update here when i find it.

@ashleyse2016
Copy link
Contributor Author

seems this is possible in the rsyslog.conf file instead

##SpamExperts test debug logging##
:programname, contains, "ProSpamFilter" /usr/local/cpanel/logs/ProSpam.log

So same steps above to log rotate it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants