Step Template Verbose Logging

I’m building a step template and trying to use standard PowerShell Write-* methods combined with Octopus’s log display types (Info, Verbose, etc). In short, I can’t figure out how to classify a log entry as Verbose.

If I put this in a step template:

Write-Debug "debug"
Write-Output "output"
Write-Verbose "verbose"
Write-Warning "warning"
Write-Verbose "verbose with switch" -Verbose
Write-Debug "debug with switch" -Debug

The raw log output is:

10:30:47   Info     |           output
                    |           WARNING: warning
                    |           VERBOSE: verbose with switch
                    |           DEBUG: debug with switch

Is there a way to control step template logging?


Hi Jason,

Thanks for reaching out. Unfortunately there isn’t a way for you to display messages as verbose the same way Octopus does it on its own output. We take your output just as it is and parse it to show the info. There is not way currently for us to tell whether it is a regular message, a warning or a verbose.

You could though modify the values of the environment variables $DebugPreference and $VerbosePreference to “Continue” which would show your messages like this

10:30:47   Info     |           Debug
					|       	output
					|			Verbose
                    |           WARNING: warning
                    |           VERBOSE: verbose with switch
                    |           DEBUG: debug with switch



Do you plan to support Write-Verbose and Write-Debug in Octopus? It would be great if Octopus capture all output (info, verbose, debug, error) but show only with detail level selected at the top of deployment log.

Hi Dmitry,

We currently dont have plans to add support to this. Still, if you submit this idea on Uservoice and it gets enough love from the community, we might be able to review this implementation in the future.