Hey @pinoooo
We will add a filter in the next version, which will allow you to set the log expiration time.
Regards,
Stanimir
Great! Thank you.
I have the plugin active for only 1 day now, and I have already 25000+ records in the log. Most records are from your own activity: for example cronjobs or WP-Admin. A good additional option would be to exclude trusted IP addresses from logging. For example the server IP or my own IP.
-
This reply was modified 2 years, 10 months ago by pinoooo.
Hey @pinoooo
Thanks got the suggestions. The plugin is in a very early stage and we will add tons of new optimizations/features and options to controls almost everything in the upcoming versions.
We just need some time to develop and release everything we have planned.
Regards,
Stanimir
Does SG Security use the existing server logs? Our does SG Security make and store his own logs?
+1 here. The the log expiration time is a must. 🙂
In the changelog of version 1.0.2: Added filter to configure log lifetime.
I can not find this?
Hey @pinoooo
Add the following code to your theme functions.php
add_filter( 'sgs_set_activity_log_lifetime', 'set_custom_log_lifetime' );
function set_custom_log_lifetime() {
return 'your-custom-log-lifetime-in-days';
}
and change 'your-custom-log-lifetime-in-days'
to the days you want to keep the logs.
We may add functionality to the plugin interface in the upcoming versions.
Regards,
Stanimir
Hi Stanimir,
Great solution.
Just to double check… The default value is 16 days, right?
We’ve changed it to 12 days and you can set a number between 1 and 12.
Great! Thanks Stanimir!! 🙂
Again, great plugin!!
Hi, thanks for help, so, do I have to set code like this?
add_filter( ‘sgs_set_activity_log_lifetime’, ‘set_custom_log_lifetime’ );
function set_custom_log_lifetime() {
return ‘5’;
}