Log4Net 的附加组件
我目前将所有日志记录转储到 Log4Net 文本文件中,它们很难阅读。是否有一个很好的 log4net 处理器(最好是一个可以添加到我的 ASP.NET 应用程序中的类,以便我可以远程查看日志),它将以良好、易于阅读和搜索的格式布置 log4net 转储?
I am currently dumping all my logging into Log4Net text files, and they are difficult to read. Is there a nice log4net processor (preferably a class I can add to my ASP.NET app, so that I can view logs remotely) that will lay out the log4net dump in a nice, easy to read and search format?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Apache 有一个名为 Chainsaw 的 log4j 工具,它显然可以与 log4net 日志文件一起使用(说明此处)。
还有一个名为 Log4Net Dashboard 的商业工具也可以做到这一点。
但这些都不是基于网络的。
前段时间有一个工具叫log4xsl。如果您将 log4net 配置为输出 XML 日志文件,则可以应用 log4xsl XSLT 样式表以在 Web 浏览器中很好地呈现它。该项目似乎已不复存在,但您可以尝试在某处找到它(此处 可能是一个很好的起点)。
There is an Apache tool for log4j called Chainsaw which can apparently be used with log4net log files (instructions here).
There is also a commercial tool called Log4Net Dashboard which can also do it.
Neither of these are web-based though.
There was a tool called log4xsl a while ago. If you configured log4net to output XML log files, you could apply the log4xsl XSLT stylesheet to render it nicely in a web browser. The project seems defunct though, but you could try to find it somewhere (here may be a good starting point).
Log2Console 可以读取日志文件,但您也可以使用它通过 .Net Remoting 或 UDP 监视“实时”事件附加器。还有一个商业工具“Log4View”也可以做到这一点。
在您的情况下,记录到数据库是最有意义的。您可以轻松地远程访问它,过滤当然没有问题。使用数据网格构建 ASP.Net 页面会非常快地完成,因此您不需要直接访问数据库。
Log2Console can read log files, but you can also use it to monitor "live" events throught .Net Remoting or UDP Appenders. There is also a commercial tool "Log4View" that can to the same.
In your case logging to a database would make the most sense though. You can access it easily remotely and filtering is certainly no problem. Building a ASP.Net page with a data grid would be done very quickly so that you do not need to access the database directly.