c# Best Method to create a log file

前端 未结 12 610
甜味超标
甜味超标 2020-12-28 13:37

I\'m writing a tool that\'s going to be check the health of workstations across a network, and will fix according to the issues it finds. I want to create a log file as the

12条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-28 14:06

    You can also take a look at the built-in .NET tracing facilities too. There's a set of trace listeners that allow you to output to a log file, but you can configure it to log into the Event viewer, or to a database (or all of them simultaneously).

    http://www.codeguru.com/csharp/.net/net_debugging/tracing/article.php/c5919/NET-Tracing-Tutorial.htm

提交回复
热议问题