Possible to get more verbose Windows Service deployment?

Is there a way to get more verbose output out of a Windows Service deployment?

The Task Log always says

[SC] ChangeServiceConfig SUCCESS
Updating the service description
[SC] ChangeServiceConfig2 SUCCESS

However, the service is supposed to be sending output, using Serilog, to a log file if it is truly running, and I never see the output.

Is there something I can do to make sure the service truly started running?

Hi @Paolo.Valladolid

Thanks for your question.

If you have access to the Windows Server in question, is the windows service actually running, or does it stop and that’s the reason you aren’t getting logs in Serilog?

It’s tricky to know what could be causing the specific issue of logs not being sent to Serilog. It could be a configuration issue with the application itself, or it could be that the application hasn’t started. I’d recommend checking Event viewer for any issues, along with any additional logging. Another tip I’ve had some success with is running the application from the command line (cmd.exe or equivalent) on the server itself to see if any errors are displayed. Sometimes errors that are printed in the console don’t appear in other logging providers such as Serilog, particularly if the error is to do with the logging provider configuration!

In either case, there isn’t much Octopus can do once the service has been configured and deployed. It doesn’t offer monitoring capabilities of a Windows Service.

You could write a script step after the deployment to check that the service is running - you could even let the script run for a set amount of time to ensure you are happy it’s running.

I hope that helps.

Best regards,