-
Notifications
You must be signed in to change notification settings - Fork 31
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
ocrd_logging.conf: attach fileHandlers #1117
Conversation
I like this idea. Logging as much as possible by default would be ideal. |
I have just tested running natively. Although I have a logging configuration in my home directory the produced EDIT: With a configuration file the changed part is never executed. I ran afterward without a logging configuration file and no logging file was created at all. |
Also warn if multiple config files are found
Can you retry with the current state of the PR and
What do you mean with "the changed part is never executed"?
That is to be expected, the builtin logging configuration only logs to STDERR. |
Now it correctly produces and fills the Output
With the
I mean the changed source code from the commits in this PR. |
OK, so it looks like the behavior is consistent now. Anything else needs adapting or can I merge? |
I just realized that with the EDIT: Running a second workflow just appends to the same log file. Could this potentially lead to logging explosion of the logs to a single file and fill the server space? This is observed only with a logging configuration file available. Should not be a main concern. |
Also in the
|
Yeah, that's the consequence of setting the root logger to
The amount of log messages depend on what is happening exactly, I suspect there will be a lot of debug logging from libraries that we should shut up by default (like
Yes, this will become a problem at some point, where you probably want to switch from the simple FileHandler to RotatingFileHandler or similar. |
Give me a few minutes before merging this so I can check the produced |
Sure, take your time, will merge in the evening. |
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.
Looks good.
ocrd_models
logger was already redundant, removedocrd
loggerocrd
logger fromERROR
toINFO
Background is that we ship the configuration as
/etc/ocrd_logging.conf
with the docker containers. With the current setup this led to an emptyocrd.log
being created and debugging further impeded by the high log level.Maybe we should go even lower and default to logging everything (
DEBUG
). It is always possible to provide a custom logging config to fine-tune the behavior, but the main goal should be to offer as much information as possible for debugging- thoughts?