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
log rotate: Add option to limit the number of rotated log tables (Trac #3253) #3253
Comments
trac user fierdor wrote on 41252702-04-19 Will it be okay if I create another table "prefix"system_log_numbers where I will store an id and with it the value of $now() For eg. Id time_created Then when I need to delete I can just run a query to obtain "prefix"system_log_* to obtain the archived tables if they exceed the number of tables in the settings. Is this design okay? |
cash wrote on 41252724-10-29 You shouldn't need to create a table for this (and we prefer to not add any additional tables). Check out http://dev.mysql.com/doc/refman/5.5/en/show-tables.html Something like "show tables like [elgg db prefix]system_log%" should work. Then parse the returned table names to get the dates. |
trac user ashwanth wrote on 41259551-05-28 fierdor are you working on this Bug fix? |
cash wrote on 41259643-05-02 Replying to ashwanth: Yes, he's been on the #elgg IRC channel talking about it |
trac user ashwanth wrote on 41259650-12-20 Replying to cash:
|
trac user fierdor wrote on 41261197-11-20 Replying to ashwanth:
|
brettp wrote on 41299619-09-21 Let's get this pull request in before we get out of sync. |
Milestone changed to |
brettp wrote on 41321982-04-22 (In [svn:9033]) Fixes #3253. Merged in Shashank's patch. |
Original ticket http://trac.elgg.org/ticket/3253 on 41236160-08-24 by cash, assigned to trac user fierdor.
Elgg version: 1.7
The current log rotation plugin takes the current system log table and copies it into an archive table. Site administrators then have to manually export/drop the tables. It would be better to work more like unix log rotation where an administrator can specify how many old logs to keep.
This requires adding a plugin setting (probably a drop down to select the number of old log tables to keep). We would also have to write a little SQL to get the table names that match <db_prefix>system_log*
The text was updated successfully, but these errors were encountered: