How do I do logging in C# without using 3rd party

2020-01-25 13:29发布

I would like to implement logging in my application, but would rather not use any outside frameworks like log4net.

So I would like to do something like DOS's echo to a file. What is the most effective way to do it?

Is there a way to log unhandled exceptions logged without using an outside framework?

7条回答
爷的心禁止访问
2楼-- · 2020-01-25 14:04

I used to write my own error logging until I discovered ELMAH. I've never been able to get the emailing part down quite as perfectly as ELMAH does.

查看更多
登录 后发表回答