add logfile cleanup utility#1872
Open
peterjanssens wants to merge 1 commit intocollectiveaccess:dev/2.0from
Open
add logfile cleanup utility#1872peterjanssens wants to merge 1 commit intocollectiveaccess:dev/2.0from
peterjanssens wants to merge 1 commit intocollectiveaccess:dev/2.0from
Conversation
Owner
|
It would be better if this did not rely upon |
Contributor
Author
|
what alternative(s) would you suggest ? |
Contributor
Author
|
I swapped the shell_exec for unlink (with glob for filematching) |
Owner
|
You could also use |
Contributor
Author
|
that helper has no pattern matching option, so you would still have to loop 'all' files no ? |
Owner
|
Yes, you'd have to loop through the files. That's going to happen one way or another. Your choice if you want to leave it as-is. We use glob in other places. Nothing wrong with it. |
Contributor
Author
|
I'm ok with this version. |
10da325 to
7bb5e87
Compare
Contributor
Author
|
that was not the proper way to handle the default (unpassed) parameters, fixed now |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We would like to propose a logfile cleanup utility. This allows for periodic cleanup (manual or cron) of the application logfiles (log_....txt).
Exisiting GarbageCollection utility does not handle logs, and the current logger doesn't auto delete old files.
Size limitations causes some logfiles to spill over to the root /tmp, so that directory was added
dry run is the default mode for a standard expiration of 100 days.
days can be set to any integer >0.
mode can be set to delete for actual deletion and verbosity can be set to verbose/quiet/silent for the sake of cron logging.