-
Notifications
You must be signed in to change notification settings - Fork 337
Add GLOO_LOG_LEVEL env #467
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
Conversation
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
gloo/common/logging.cc
Outdated
| const char* level = getenv("GLOO_LOG_LEVEL"); | ||
| // Defaults to ERROR. | ||
| if (level == nullptr) { | ||
| log_level = LogLevel::ERROR; |
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.
Can we make this match PyTorch (which I think is WARN?)
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 got it!
| return log_level; | ||
| } | ||
|
|
||
| const char* level = getenv("GLOO_LOG_LEVEL"); |
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.
Also, the info logs are currently very important for debugging production jobs. Can we also check LOGLEVEL and use that value if GLOO_LOG_LEVEL isn't set?
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.
Sorry, what and where is LOGLEVEL? I don't have enough context.
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.
I think for gloo you need to import it into fbcode and land. We don't have a bot to merge IIUC
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.
hope we can make it work soon, so that #466 is useful
|
@youkaichao merged now. Sorry for the delay. |
Accepted values:
ERROR, WARN, INFO, DEBUG
Default value:
WARN