-
Notifications
You must be signed in to change notification settings - Fork 46
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
Update 2.x logging #308
Update 2.x logging #308
Conversation
Signed-off-by: colramos-amd <colramos@amd.com>
Signed-off-by: colramos-amd <colramos@amd.com>
Signed-off-by: colramos-amd <colramos@amd.com>
Signed-off-by: colramos-amd <colramos@amd.com>
Signed-off-by: colramos-amd <colramos@amd.com>
Signed-off-by: colramos-amd <colramos@amd.com>
Signed-off-by: colramos-amd <colramos@amd.com>
Signed-off-by: colramos-amd <colramos@amd.com>
Signed-off-by: colramos-amd <colramos@amd.com>
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
loglevel is set to ERROR Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
loglevel delimiter in output Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
indented output with profiler selection when enabled Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
* add a profileMode keyword option, used to indent profiling output * update logic if forked process is not successful, output is displayed directly with INFO logging or lower; also dispaly output in ERROR mode if the process fails Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
lines prior to code exit Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
quiet arg to setup_logging function Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
(1) setup_logging_handler -> called prior to arg parsing (2) setup_logging_priority -> called after arg parsing Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
this function enables file-based logger output for use with profile mode Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
…o debug logs Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
…o debug Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
wrapper and push into base class via a companion utility function Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
4a551b7
to
3c67670
Compare
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
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.
Thanks for this! I had a few minor suggestions below
src/utils/utils.py
Outdated
print("Please ensure that the 'en_US.UTF-8' locale is available on your system.") | ||
print("") | ||
print("ERROR: ", error) | ||
sys.exit(1) |
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.
Is there a reason we're not using console_error()
here? If we want to standardize it we can use:
print("Please ensure that the 'en_US.UTF-8' locale is available on your system.") | |
print("") | |
print("ERROR: ", error) | |
sys.exit(1) | |
console_log("Please ensure that the 'en_US.UTF-8' locale is available on your system.") | |
console_log("") | |
console_error(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.
Yes, because this check happens right up front before the logging handlers and formatters are configured. Consequently, you will get the default formatter which is a bit confusing and looks odd.
To be fair, I'm not sure we need this check right up front but I was trying to keep it similar to what you had while moving out of top-level omniperf to keep that file clean. If we wanted to push this check a bit further down the call stack, then we could likely go back to using console_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.
Added add814f which implements this approach to set_locale_encoding after logging is fully initialized.
Co-authored-by: Cole Ramos <colramos@amd.com> Signed-off-by: Karl W. Schulz <koomie@users.noreply.github.com>
Co-authored-by: Cole Ramos <colramos@amd.com> Signed-off-by: Karl W. Schulz <koomie@users.noreply.github.com>
Co-authored-by: Cole Ramos <colramos@amd.com> Signed-off-by: Karl W. Schulz <koomie@users.noreply.github.com>
Co-authored-by: Cole Ramos <colramos@amd.com> Signed-off-by: Karl W. Schulz <koomie@users.noreply.github.com>
Co-authored-by: Cole Ramos <colramos@amd.com> Signed-off-by: Karl W. Schulz <koomie@users.noreply.github.com>
Co-authored-by: Cole Ramos <colramos@amd.com> Signed-off-by: Karl W. Schulz <koomie@users.noreply.github.com>
Co-authored-by: Cole Ramos <colramos@amd.com> Signed-off-by: Karl W. Schulz <koomie@users.noreply.github.com>
Co-authored-by: Cole Ramos <colramos@amd.com> Signed-off-by: Karl W. Schulz <koomie@users.noreply.github.com>
Co-authored-by: Cole Ramos <colramos@amd.com> Signed-off-by: Karl W. Schulz <koomie@users.noreply.github.com>
function to use console_error() directly (#308 (comment)) Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
Thanks for all the suggestions. I think I landed all of them and tried to address use of If you're satisfied, I think we are ready to land this PR. |
One other minor comment: this will affect a number of the CLI examples shown in the docs and we will need to update those as well at some point. |
Great! I'll hop on those doc changes as soon as it's landed |
This PR builds on top of the nice work of #236 to take advantage of improved logging and enables a quiet mode of operation via
-q
or--quiet
. It also re-establishes the creation of alog.txt
file is stored in the workloads directory when run in profiling mode. This file will include profiling output even when the console mode is configured to run in quiet mode.Quiet mode example
Full profiling output from above would reside in workloads/atest/MI200/log.txt, e.g.