且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用健康监控ASP.NET Web应用程序日志记录不工作

更新时间:2022-11-06 08:56:59

如果你想看到它的时候了尝试禁用缓冲

If you want to see it right away try disabling buffering

<add name="MySqlWebEventProvider" type="System.Web.Management.SqlWebEventProvider" connectionStringName="MySqlConnection" maxEventDetailsLength="1073741823" buffer="true" bufferMode="Logging"/>

更改

<add name="MySqlWebEventProvider" type="System.Web.Management.SqlWebEventProvider" connectionStringName="MySqlConnection" maxEventDetailsLength="1073741823" buffer="false" bufferMode="Logging"/>

这应该停止所造成的缓冲延迟,你应该看到的行出现的时候了。

This should stop the delay caused by buffering and you should see the rows appear right away.

另外,你可能要减少你的minInterval的配置文件,以快速的东西,如00:00:01:)

Plus you may want to decrease your minInterval on the profiles to something quick like "00:00:01" :)

您可以阅读更多关于缓冲位置:

You can read more about buffering here:

http://msdn.microsoft。 COM / EN-US /库/ ms178708%28V = VS.80%29.aspx

在实际系统它也许是一个好主意离开缓冲到位的情况下,你认为你的SQL服务器可能有很多事件射击超载。

On a live system it maybe a good idea to leave buffering in place in case you think your SQL server might get overloaded with lots of events firing.

***专业教育学院发现,我可以强制它被保存到日志:

Ive found i can force it save to the log by:

1:开始在Visual Studio项目
2:单击按钮
3:停止该项目,然后再次启动
4:检查在数据库中,你应该看到事件记录

1 : start your project in visual studio 2 : click the button 3 : Stop the project and then start it again 4 : Check in the database you should see an event logged