Product Reviews

Gurock SmartInspect Improves Application Logging

Gurock SmartInspect not only allows you to log anything you want, it includes a powerful tool for analyzing the results.

Gurock Software's SmartInspect is very nearly the logging application you always wanted. In addition to letting you write text messages to a log file, you can also write objects, including exception objects; whole files; and even the contents of Streams. SmartInspect will let you write to multiple logs, including logs on other computers using the SmartInspect Router. You can, for instance, have the logging data from all of your users' computers written to a single log file on a central computer. Unlike profiling tools like ANTS Performance Profiler, which we've previously reviewed ("ANTS Performance Profiler," November 2009), SmartInspect must be compiled into your application. However, this means that you don't need to install SmartInspect itself on any computer but yours.

Installing SmartInspect on my development machine took only a few minutes. To incorporate logging into my application, I added references to two libraries and

inserted two lines of code to enable and configure logging. You can also configure logging by reading in a configuration file, which can turn logging on or off and control where your log is kept. Deploying my application with SmartInspect was equally easy: I just had to ensure that I included the Gurock.SmartInspect.DLL.

As with any logging solution, you can only log an application if you insert instrumentation code: calls to methods that write log messages. SmartInspect provides dozens of logging methods, including specialized methods for building call stacks and logging standard .NET objects, such as AppDomains. You can also set up event handlers that allow you to log all exceptions from a single location.

The SmartInspect Console
There are a number of free logging tools available that share functionality with SmartInspect-Microsoft's Enterprise Library Block and log4net, for instance. The jewel in the SmartInspect crown is the log analysis side of the package: SmartInspect Console. In addition to organizing the variety of log content that SmartInspect generates, the Console lets you create filters and views to find the log entries you're interested in. When a single file contains entries from multiple applications or multiple threads, Process Flow lets you follow the messages from a single process.


[Click on image for larger view.]
Figure 1. The SmartInspect Watches window allows you to track log entries of numeric values over time to spot trends, peaks and interruptions.

To take full advantage of the Console you'll need to write to SmartInspect's proprietary binary format. If you need to share files with others, however, you can write to a plain text file, though you'll lose much of SmartInspect's functionality in the process.

As I said, SmartInspect is nearly the logging tool you always wanted. I'd like the ability to write log entries asynchronously to reduce the impact of logging. And, because I like manipulating data with SQL, I'd appreciate the ability to log to a set of database tables, rather than SmartInspect's proprietary format and plain text. I also found the documentation to be long on code and short on explanations. Finally, the SmartInspect Console, which also supports Java and Delphi, is a standalone tool and doesn't integrate with Visual Studio.

Gurock SmartInspect

Gurock Software GmbH
Web: www.gurock.com
Phone: +49 5251-876-9160
Price: $299; discount for bulk purchases
Quick Facts: A suite of tools for generating and viewing log information
Pros: A powerful analysis tool joined to a good-though not great-logging tool
Cons: Doesn't integrate with Visual Studio; terse documentation

About the Author

Peter Vogel is a system architect and principal in PH&V Information Services. PH&V provides full-stack consulting from UX design through object modeling to database design. Peter tweets about his VSM columns with the hashtag #vogelarticles. His blog posts on user experience design can be found at http://blog.learningtree.com/tag/ui/.

comments powered by Disqus

Featured

Subscribe on YouTube