How does Octopus detect "Error" lines in a custom step?

Octopus version: v2018.9.11

Hi! We are using a custom step to call gcloud so do some Google App engine deployment stuff.

However all gcloud commands seem to have their output flagged as “Error” and highlighted in red. E.g. this line in the log is the result of a successfully completed command.

14:18:55   Error    |       Updated property [core/project].

The command actually completes fine but leaves the project with a warning triangle :warning: on it. How does Octopus determine what lines are “info”, “error” etc? Is it just output streams? How could I squash everything into “Info”?

Hi Neil,

Thanks for getting in touch.

You’re 100% correct with your theory that Octopus uses the output streams to determine what level of information any log line is (Error, Info etc). So to redirect the error stream it should just be a case of using 2>&1 to redirect the error stream to standard out which will make those messages appear as Info in our logging. If needed this blog post has some pretty good information on what is happening here.

I hope that helps, if there is anything else you need please let me know!


Super, thanks Alex!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.