-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Truncate output that we log from commands to 10 lines #9286
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.
Looks good! There are some feedback that could be applied as well.
@@ -457,7 +457,8 @@ def run_command_class( | |||
if warn_only: | |||
msg = 'Command {cmd} failed'.format(cmd=build_cmd.get_command()) | |||
if build_cmd.output: | |||
msg += ':\n{out}'.format(out=build_cmd.output) | |||
truncated_output = "\n".join(build_cmd.output.split("\n")[:10]) |
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.
What about logging the 10 first and the 10 last lines?
8
9
10
....
98
99
100
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.
🤝
Failing test is unrelated (jupyterbook docs change) |
8fa5c94
to
aa045c5
Compare
Make output nicer and add first/last 10 lines Log correct string
aa045c5
to
9156413
Compare
The logic wrote in #9286 was incorrect. The logs keeps showing a lot of the command's output. We want to take the first 10 lines and the last 10 lines.
The logic wrote in #9286 was incorrect. The logs keeps showing a lot of the command's output. We want to take the first 10 lines and the last 10 lines.
Refs #9105