In java world you have log4j and a a pretty decent logging framework, is there anything like that for C#/.NET?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
NLog is a good option.
Is there anything that the Windows Event Log + Log Parser can't do for you?
Actually, if you don't need sophisticated logging options straight out of the box, I would suggest writing a thin interface that defines your logging needs (such as log.debug(), log.error(), etc). This will give you flexibility if you need to change latter, or find problems with your current implementation.
While this doesn't seem like a big gain, it was a big win for us recently when we ported our framework to the Windows Compact Framework, and none of the logging options worked. We were able to slide in a null logger, which saved us on that platform. Of course, evaluate for your specific project and needs.
log4net would be the obvious answer.