-
Notifications
You must be signed in to change notification settings - Fork 27
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
Redirect prints from Spack to log file #257
Redirect prints from Spack to log file #257
Conversation
2da9034
to
0dadf8b
Compare
1c47f12
to
46b7075
Compare
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. Overall it looks good, I have a few things that should be changed in the PR, and one bug that I ran into while testing it.
It seems if you use debug mode, most of the debug output is just lost entirely and not written to any of the log files.
Verbose appears to work correctly, but debug doesn't for some reason.
lib/ramble/ramble/test/end_to_end/unused_compilers_are_skipped.py
Outdated
Show resolved
Hide resolved
lib/ramble/ramble/test/modifier_functionality/mock_spack_modifier.py
Outdated
Show resolved
Hide resolved
46b7075
to
d9af42b
Compare
All fixed up. Just needed to pass the global debug setting to the logger. |
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! Debug works now. A few more nits about the log file stuff though.
Redirects prints from Spack to a log file to provide a better experience to users
d9af42b
to
4d70617
Compare
Redirects prints from Spack to a log file to provide a cleaner command line experience for users. Logger wraps everything within the run_pipeline() method in workspace.py, which currently covers workspace setup, analyze, and mirror commands. All of stdout gets redirected into the logfile, unless inside a logger.force_echo() block. Added force_echo() blocks to all errors / tty.die within spack.py to ensure errors get printed to stdout.