-
Notifications
You must be signed in to change notification settings - Fork 272
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
Make provenance information in log optional #2328
Conversation
Another option here is simply to never write the provenance to the stdout logfile. I only had added that for debugging before I had added the That way, no new option is needed. I don't really see a use case for turning it on again. What might be useful in the DEBUG output is just to print the configuration (either from |
ctapipe/core/tool.py
Outdated
@@ -173,6 +173,13 @@ def main(): | |||
help="Logging Level for File Logging", | |||
).tag(config=True) | |||
|
|||
log_include_provenance = Bool( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't add an option for this (it's somewhat confusing to have control options affect only debugging output). Better to just decrease the log level of that print out (could set it to 5, which is below debug), or as I mentioned below, simply remove the printout altogether. I think I prefer the latter option to just drop it, as we already print it in the provenance file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could also add use a specific provenance sublogger so it's configurable on its own.
self.log.getChild("provenance").debug(...)
The inclusion of all the packages in the environment into the provenance information makes it so long it usually completely dominates the line count of any logfile. This change adds a option that defaults to not including provenance in the log (in addition to it being written to a file).