admin管理员组文章数量:1395137
I have Windows Service, written on the Framework 4.8, which writes logs with log4net, version 3.0.3. log4net writes at the same time in the local file on the server, and in the sql db with log4net.Appender.Adonetappender. After starting the service, for some time everything works as it should, but then suddenly he will stop writing into the database, although they continue to writes in the logs file. There are no errors in the Event Viewer, not on the server itself or on sql server. After restarting the service, everything works again, but then it is interrupted again, to track some legality when this happens, I could not, sometimes this happens after 1/2 hours, and sometimes after 2 days.
The configuration is like this:
<appender name="AdoNetAppender" type="log4net.Appender.AdoNetAppender">
<bufferSize value="1" />
<connectionType value="System.Data.SqlClient.SqlConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<connectionString value="data source=SQL-Serv1;initial catalog=MyDataCatalog;integrated security=false;persist security info=True;User ID=aaa;Password=bbb;" />
<commandText value="INSERT INTO Log ([Date],[Thread],[Level],[Logger],[Message],[Exception],[Guid],[Method]) VALUES (@log_date, @thread, @log_level, @logger, @message, @exception, @guid, @method)" />
What could be a problem?
本文标签: log4net stops writing to the dbStack Overflow
版权声明:本文标题:log4net stops writing to the db - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744736394a2622355.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论