在asp.net中创建错误日志文件 [英] creating error log file in asp.net

查看:150
本文介绍了在asp.net中创建错误日志文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

处理我的Web应用程序中的错误

我正在创建一个日志文件,该文件将在global.asax的Application_Error()事件中创建

和那些日志文件根据日期创建(每天1个)



我正在考虑发生错误并且在同一时间点发生的情况

文件从中获取多个用户同时



所以它可能会抛出另一个用户已经使用的文件的异常

它可能就像我不是肯定



任何人都可以帮忙处理这种情况



非常感谢

To Handle the error in my web application
I am Creating a log file which will be created in Application_Error() event of global.asax
and Those log file created based on date (1 per day)

I am Considering scenario where error occured and at same instance of time
file getting write from multiple users at same time

so it may throw exception that file already being used by another user
it may be like that i am not sure

can anybody help to deal with such scenario

many thanks

推荐答案

看看以下内容:

使用ASP.NET和C#创建简单的错误日志文件 [ ^ ]

使用企业库进行记录 [ ^ ]

使用ASP.NET 2.0进行错误记录 [ ^ ]

在ASP.NET中记录错误 [ ^ ]
Have a look at the following:
Create Simple Error Log Files using ASP.NET and C#[^]
Get Logging with the Enterprise Library[^]
Error Logging using ASP.NET 2.0[^]
Error logging in ASP.NET[^]


嗨检查下面的内容链接



http://www.dotnetpools.com/2012/11/error-log-creation-using-c-in-aspnet.html [ ^ ]
Hi check the below link

http://www.dotnetpools.com/2012/11/error-log-creation-using-c-in-aspnet.html[^]


.NET最强大的日志工具之一是log4net。它的.NET免费的extranal libary.Just需要在你的项目中使用它。使用这个库你可以记录所有的事件,如信息,调试,错误等。



有关详细信息,请参阅以下链接



log4net Tutorial [ ^ ]
One of the greatest logging tools for .NET is log4net. Its .NET free extranal libary.Just need to use that in your project.Using This libary you direclty logg the all the event like info,Debug,Error etc.

For detailed information please refer below link

log4net Tutorial[^]


这篇关于在asp.net中创建错误日志文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆