How to capture console output from a service C#?

后端 未结 7 1588
无人及你
无人及你 2021-02-07 06:12

We have a C# service that is deployed to a remote customer system. The application writes a substantial amount of \"diagnostic\" information to the console (i.e. Console.WriteL

7条回答
  •  鱼传尺愫
    2021-02-07 06:35

    Are you able to change the service code at all? If so, using Console.SetOut to write to a file instead would be the most obvious first port of call. Then change to using a proper logging library for the next release :)

提交回复
热议问题