问题
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?
回答1:
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).
回答2:
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.
来源:https://stackoverflow.com/questions/4702853/add-ons-to-log4net