log4net 与 SQLite 错误 - 在应用程序关闭之前不将日志保存到数据库

发布于 2024-11-07 04:13:11 字数 204 浏览 2 评论 0原文

应用程序在 SQLite 数据库中使用 log4net 创建日志。 此处描述了使用的架构 错误是,在应用程序关闭之前,数据不会保存到数据库。 在应用程序执行期间 - 数据库不包含新数据。

有什么想法吗?

Aplication creates logs using log4net in a SQLite db. Used schema is described here
Bug is that the data aren't saved to db until aplication is closed.
Durring app execution - db contain no new data.

Any ideeas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

小草泠泠 2024-11-14 04:13:11

您描述的问题可能与附加程序缓冲消息有关。尝试将 缓冲区 设置为 1。

The problem you describe could be related to the fact that the appender buffers messages. Try setting the buffer to 1.

苦妄 2024-11-14 04:13:11

将此行添加到您的附加程序中:

  <lockingModel type="log4net.Appender.FileAppender+MinimalLock" />

add this line to your appender:

  <lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文