-
Notifications
You must be signed in to change notification settings - Fork 183
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
Modify log config to write errors to a separate log file #3050
Conversation
@IsaacYangSLA please review. Thanks! |
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.
Very nice!
/build |
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.
Mostly LGTM, have some questions
class=FileHandler | ||
level=ERROR | ||
formatter=fullFormatter | ||
args=('error.log', 'a') |
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.
Are we using this arg?
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.
Currently not
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.
Got it.
I would suggest either removing it in this PR or submit a follow up PR that makes use of this arg.
Thanks!
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.
Actually, I tried removing it and there are errors, so it seems that it does go through some code that checks that there is at least one required positional argument so we may need to keep this for now.
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.
You may be able to use it as template: use the configured file name instead of hard-coding it to error.log in fed_utils. But this may create other complications later when you try to send this log file to the server - you won't know the file name any more unless you keep it somewhere (e.g. data bus).
Let's deal with this in another PR.
/build |
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.
LGTM
Modify log config to write errors to a separate log file in addition to log.txt.
Description
Modify log config to write errors to a separate log file in addition to log.txt. I think this covers all the places we provide a default log config and this will enable future work for the error logs to be aggregated for reporting and downloading.
Updated nvflare/private/fed/utils/fed_utils.py to add an error log file to write errors to using the configuration of the error file handler based on the errorFileHandler in log.config.
Types of changes
./runtest.sh
.