如何在Web应用程序中写入日志文件?
问题描述:
我有一个Web应用程序,可通过SMSAPI向许多用户发送短信.
我想将有关向其发送短信的所有用户的信息写入日志文件.
示例如果SMS发送给10个用户
然后我要登录10个用户的电话号码.
请帮助..
I have a web application that send sms to many user through SMSAPI.
I want to write to Log File the information about all user to whom sms is sent.
Example If SMS is send to 10 Users
Then I want to log Phone No of 10 Users.
Please Help..
答
我建议使用Log4Net. 如何使用log4net [ http ://sadi02.wordpress.com/2008/06/29/log4net-tutorial-in-c-net-how-can-i-show-log-in-a-file/ [ ^ ]
I suggest Log4Net.Take a look at this. How to use log4net[^]
This below article has the web.config settings to write to file.Take a look
http://sadi02.wordpress.com/2008/06/29/log4net-tutorial-in-c-net-how-can-i-show-log-in-a-file/[^]
此 [ ^ ]的文章可能会对您有所帮助.
This[^] article might help you.