After working on this new version for more than a year, SmartInspect 2.0 comes with over 100 new features, improvements and bug fixes in the libraries, the Console and the Configuration Builder. This version features a completely redesigned and Unicode enabled graphical user interface for the Console and the Configuration Builder, adds many exciting major and minor productivity improvements to the Console, introduces support for enterprise-grade backlog queue management in the libraries, adds new library protocols, session tracking, log rotation and a lot more.
The new backlog functionality in the SmartInspect libraries provides a size-limited and highly configurable packet queue which drastically minimizes the I/O performance costs of logging. If the backlog functionality is enabled, log packets are first written to a queue in memory rather than directly to the logging destination. The queue can be configured to have a certain trigger log level and a maximum size. If a log packet arrives with a log level equal to or greater than the specified trigger log level, the queue is flushed and all packets in the queue are written to the actual destination.
Designed especially for production usage, the backlog feature can be used and configured to save log packets to a log file in case of an error and allows analyzing errors in their context. Unimportant log entries that were generated long before an error occurred are automatically discarded. This approach guarantees the best performance during regular production usage and enough information when an actual error occurs. For more details about the new backlog functionality, please refer to the new Exploring the Backlog Functionality of the SmartInspect Libraries article.
All components of SmartInspect (Console, libraries, Configuration Builder) have been updated to fully support Unicode. Among others, you can now log Unicode data, log to and open logs with Unicode file names, use Unicode for view or category names and save a project or tool with a Unicode name.
The entire graphical user experience of SmartInspect has been updated to a modern new look. Besides updating the look and feel of the toolboxes and toolbars, changing the default docking layout and redesigning the wizards, message boxes and dialogs, the Console and Configuration Builder now fully support ClearType for font anti-aliasing.
Additionally, new icons and actions have been added to existing toolbars as well as new toolbars to the View Categories and Process Flow toolboxes.
The SmartInspect classes of the libraries are now capable of tracking their child sessions. Instead of being only responsible for creating the sessions like in previous versions, the SmartInspect classes can now optionally maintain a list of sessions for easier access. For this purpose, new methods for session management (lookup and deletion) have been added.
/* Create a new session and store it for later access. */ Session session = SiAuto.Si.AddSession("Client #982", true); ... /* Lookup a previously added session. */ session = SiAuto.Si.GetSession("Client #982"); ... /* Delete a session which is no longer needed. */ SiAuto.Si.DeleteSession(session);
The new session tracking functionality is especially interesting for applications with many SmartInspect sessions like web or server applications with a dedicated session for each client. This new feature removes the need to track the logging sessions manually and allows easier integration of SmartInspect into complex applications.
SmartInspect 2.0 also introduces a log rotation option for the file protocols. If log rotation is enabled for a particular connection, the log can be configured to be rotated hourly, daily, weekly or monthly. This often requested feature is especially useful for production systems and gives more control over the occupied disk space and the generated logs in general.
To highlight important sections in your log, you can now change the background color of log entries directly in the Console. Imagine changing the background color of important log entries before you forward the log to a co-worker to mark certain areas of interest. To change the background color of a log entry, you can choose from a pre-defined list of high contrast colors in the view popup menu.
The new text protocol of the libraries addresses the need for simple end-user log files that can be read with a normal text editor. The textual representation of a log file can be influenced with a pattern string and all features of the traditional file protocol like log rotation and maximum sizes are available as well. Since a SmartInspect instance can use more than one connection at once, this allows generating text logs for end-users with basic information and rich binary logs for developers at the same time.
The memory protocol can be used for writing logging information to memory instead of writing it directly to file or sending it to the Console. When needed, it can save its queue of logging data to a user-supplied stream or file. The memory protocol has been designed to allow exception reporting mechanisms to include a log file when an error occurs.
When an end-user sends an exception report to the developer, it is now possible to use rich SmartInspect log files in addition to traditional call stack information to inspect an error. And because the memory protocol can be configured to use only a tiny bit of memory space, it is both very fast and consumes only few resources and can stay enabled at all times.
Several new features have been added to the views in the Console. First, the views now support inverse filtering. This allows specifying if a certain result for a filter should be inverted. As an example, it is now possible to limit a view to all log entries whose session differs from the "Main" session by specifying a simple session filter for "Main" and checking its invert option.
Second, the view filters have been enhanced to support log entry title filtering. This means that you can now limit views to log entries whose titles match a certain string. Title filters have a case sensitive option, support for regular expressions and you can optionally invert the filter result to exclude log entries.
Other new view features include the Clear View Rules functionality to clear view filters with a single click, the Clone View functionality to clone a view, the new Close Other Views option to remove multiple views at once and a lot more. AutoView rules have also been enhanced to support log entry types as well as the new title and inverse filtering.
Although technically another view feature, this new feature deserves a section on its own. With the new marker functionality, you can let views automatically highlight or mark log entries with a background color.
Markers can use the same powerful filtering mechanisms as views. For example, you can now highlight each log entry with the color green whose session equals "Main". Or you can highlight every log entry with the color yellow which originates from the host "www.example.com" and whose title matches the regular expression string "^Connection". Or you can simply mark every error with the color red.
Each view can have its own set of markers and markers are also fully supported by AutoView rules. This means that views which got added by AutoView rules automatically inherit and apply the markers of the corresponding parent AutoView rule.
New watch methods for tracking so called named counters have been added to the Session class in the libraries. A named counter has a name and an integer value and there are methods for incrementing and decrementing these counter values. For each method call, the integer value of the passed counter is first incremented or decremented by one and then logged.
SiAuto.Main.IncCounter("Counter"); /* Sends Counter = 1 */ SiAuto.Main.IncCounter("Counter"); /* Sends Counter = 2 */ SiAuto.Main.DecCounter("Counter"); /* Sends Counter = 1 */ SiAuto.Main.ResetCounter("Counter"); /* Resets Counter to 0 */
Besides incrementing, decrementing and logging counters with the DecCounter and IncCounter watch methods, counters can be reset to 0 again with the ResetCounter method. Named counters are especially useful for tracking steadily increasing and decreasing values and make a manual value tracking approach unnecessary. A typical use for named counters is tracking resources like the amount of open file handles, active database and client connections.
The new Watches Graph toolbox can track numeric watches and displays them in a convenient time graph. In addition to displaying a graph for each added watch, the Watches Graph toolbox displays additional information about watches like the minimum, maximum and average values.
The new Watches Graph is especially useful for tracking and visualizing application resources like databases connections, file handles or the amount of allocated objects. With the help of the Watches Graph it is possible to detect temporary peaks, to find resource leaks and to monitor the general resource behavior of your application.
SmartInspect now fully supports custom protocols in the libraries. You can register your own protocols and use them like the built-in ones. Custom protocols inherit the options common to all protocols (like the backlog functionality or the log level) and additional protocol specific options can also be added. Once registered, a custom protocol can be specified in the connections string like the built-in protocols.
In addition to custom protocols, the libraries now also support custom protocol actions. With custom protocol actions you can trigger certain events in your custom protocol by calling the new Dispatch method of the SmartInspect class. For example, the new memory protocol uses such a custom protocol action to save its internal queue of packets to a user-supplied stream.
For an in-depth article about custom protocols with an example implementation of a new protocol, please refer to the Using Custom Protocols in the SmartInspect Libraries article.
A new dialog for quickly finding and navigating to methods has been added to the Console. The so called "Go to Method" dialog displays the methods of the current view and allows entering a search filter to limit the list of found methods to those which match the specified filter. After choosing the desired method, you can jump to it in the current view simply by pressing the Enter key.
New font related options have been added to the Console. It is now possible to specify the name and size of the monospaced font in the Console and the areas (e.g. a certain viewer or toolbox) which should use this font.
Also new is the "Ignore clear commands in log files" option which prevents log files from clearing the Console when opened, the "Only allow a single instance of the Console at the same time" option which prevents the Console from being started multiple times at once and the "Reset Console when minimizing to notification area" option which can automatically reset the Console when it's closed to the notification area of the Windows taskbar.
A new Fatal log entry type and log level has been added to the libraries and the Console. For a better differentiation between recoverable and unrecoverable errors, the added LogFatal method and the corresponding Fatal log entry type and log level can now be used in addition to the already existing LogError method and related Error log entry type and log level.
Additionally, the LogAssert method now uses its own Assert log entry type instead of the generic Error type for better filtering in the Console. Also new are the Conditional log entry type and the related LogConditional method which logs a message only if a certain condition is true. The LogConditional method can thus be seen as the counterpart to LogAssert which logs a message only if a certain condition evaluates to false.
Although technically already possible in previous versions of SmartInspect, filtering for multiple values in the views of the Console was a bit difficult. It was necessary to manually enter a comma separated list of the desired values in the prepared filter combo boxes. This behavior has been greatly improved with a new dialog which drastically simplifies the editing and setting of multiple values for a filter.
Entering multiple values with the new multi value dialog and the enhanced Filters tab in the view and AutoView rules dialogs is now much easier.
SmartInspect 2.0 also introduces support for Microsoft's new operating system Windows Vista. Additionally this version adds support for the development platforms Microsoft .NET 3.0 as well as Sun's Java 1.6.
The following list displays all changes of the SmartInspect v2.0 release at a glance. The changes are divided into multiple sections (libraries, Console and so on) for easier identification.
A fully functional trial version of SmartInspect 2.0 can be downloaded in our Downloads area. Orders can be placed in our Online Store. Registered customers can upgrade to the new major version for a generously discounted update fee.