Truncate output that we log from commands to 10 lines
Make output nicer and add first/last 10 lines
Log correct string
@@ -455,11 +455,16 @@ class BaseEnvironment:
if build_cmd.failed:
if warn_only:
- msg = 'Command {cmd} failed'.format(cmd=build_cmd.get_command())
+ msg = "Command failed"
+ build_output = ""
if build_cmd.output:
- msg += ':\n{out}'.format(out=build_cmd.output)
+ build_output += "\n".join(build_cmd.output.split("\n")[10:])
+ build_output += "\n ..Output Truncated.."
+ build_output += "\n".join(build_cmd.output.split("\n")[:10])
log.warning(
msg,
+ command=build_cmd.get_command(),
+ output=build_output,
project_slug=self.project.slug if self.project else '',
version_slug=self.version.slug if self.version else '',
)
