Redirect stdout+stderr on a C# Windows service

前端 未结 2 484
逝去的感伤
逝去的感伤 2020-11-27 19:58

I\'ve written a Windows service in C# using the ServiceBase helper. During its execution some procedures on an external native DLL are called. Annoyingly, those

2条回答
  •  迷失自我
    2020-11-27 20:20

    Check out the Console.SetOut method.

    It will allow you to redirect console output to a TextWriter.

提交回复
热议问题