Are there any ELMAH-style exception logging components for non-http applications?
ELMAH is purpose-built for logging exceptions in ASP.Net, which is fine, but it does leave a lot of people (myself included) wanting to solve the same all-encompassing exception logging/viewing problem for non-web applications.
Do you know of any open source components for开发者_开发问答 general purpose exception logging and reporting in the vein of ELMAH?
There is a website called Exceptioneer. Once integrated into your app, all exceptions are sent to heir website whereyou can log in and view them - which is perfect if an off-site customer has an issue.
Alternatively, there is log4net or NLog - the latter being the one I prefer.
There is the logging application block from Microsoft, as well as the apache foundation log4net.
Both are open source and free.
log4net
is stand alone and simpler to understand, the application block is part of several application blocks that work together (though can work separately) and is in my opinion more complex.
There are several logging frameworks available. Our company used two different ones before switching to the object guy's. Personally, I find it to be much more straight forward to use than the others. YMMV.
The same author also offers a separate service you might be interested in that allows you to collect and view logs from applications. We have not used this service yet, so I can't comment further on it. But it does look interesting and probably very useful for some people.
If you're willing to consider a commercial product, take a look at GIBRALTAR. It works with any .NET prograrm logging exceptions like ELMAH as well as logging trace messages using log4net, NLog, or own logging API. In addition, it collects windows performance counters like PerfMon and collects application usage metrics like PreEmptive's Runtime Intelligence Service.
A couple screenshots are shown below to give you a sense of Gibraltar. You can see more screenshots at http://www.gibraltarsoftware.com/See/Screenshots.aspx
The image below shows a summary of 2000+ session logs grouped by O/S, timeframe, and application with error summary for selected session.
This next image shows details of a single session integrated with graphs of memory and processor usage. Messages from the VerticalProgressBar class are highlighted by selecting the class in the treeview and the source code is shown for the selected log message.
This final image shows a summary of execution time and call frequency for a set of monitored methods with details below on individual method calls. Gibraltar allows efficient performance monitoring that can be used in production. Methods are easily monitored by simply tagging them with attributes and Gibraltar also includes an API allowing programmatic logging of custom metrics.
精彩评论