-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
OverrideLogCleanerFilePathPrefix to override the files the log cleane… #1083
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
My requirement was that I delete old log files, regardless of log level. I would be keen to hear any feedback. |
05a994b
to
10bb9cd
Compare
Add OverrideLogCleanerFilePathPrefix to override the files the log cleaner removes
Thanks for the PR! However, I'm not sure I understand why we need to extend the public API instead of fixing the underlying issue? |
I don't think I have come up with a better alternative. I'm open to suggestions. Some possible thoughts:
|
The suggestion from #1062 is that we can fix IsLogFromCurrentProject, but I don't know if that is possible in general because the user can set any log name style they want with SetLogDestination |
I would prefer no additional methods if possible since using log cleaner will become less intuitive than it already is. While the log destination can be different the suffix is always the same. Combined with the observation that log severities are known at compile time determining candidates for deletion should be doable. |
Consider: SetLogDestination(GLOG_INFO, "/path/to/logs/applog-carrots-"); If we had a registration system, then that would work, but trying to fix IsLogFromCurrentProject seems futile. |
As I see it, an internal registration system is still a better solution than shifting the burden of managing log file paths onto users. |
OK, thanks. I've closed this one, and opened a new one to do the registration system approach. #1086 |
…r removes