How to include user id who initiated deployment in ServerTasks log?

We would like to include user id who initiated deployment into ServerTasks log files.
are there ways to achieve this ?
Any helps will be greatly appreciated.



Hi @raymond.lau!

Thanks for reaching out - while not explicitly logged in the Server task log by default, you could add a step at the start of your deployment(s) to echo the contents of the Octopus.Deployment.CreatedBy.DisplayName Octopus system variable to get the identity of the user who created the deployment.

I hope this helps!

Hi @Justin_Walsh ,

Thanks, one more question, are there ways to add this new step as a default step that will execute by all deployments ? so that don’t need to modify every single existing project’s and new projects in the future.


Hi @Justin_Walsh ,
Also in the ServerTasks log, what is the first column ? and are there ways that we could rearrange these columns order ?

Sadly, there’s no way of doing this at this time, but I can reach out internally to see if we can get the default logging of the user in the task logs.

That’s the raw format that we store the task logs on disk, which isn’t customizable. You can access the rendered task log via the API by hitting the <YOUR_OCTOPUS_URL>/api/<spaces-#>/tasks//raw endpoint.

Other options, potentially for finding who deployed a release would be using the API to examine the Audit log, and determine that data. You could try this script.

I hope this gives you some more options to investigate! Please let us know if you have any further questions or concerns.

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