What's New in SmartInspect 2.0

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.

Backlog queue management

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.

Backlog queue management Backlog queue management

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.

Full Unicode support

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.

Graphical user interface redesign

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.

Redesigned graphical user experience
Redesigned graphical user experience (click for larger image)

Additionally, new icons and actions have been added to existing toolbars as well as new toolbars to the View Categories and Process Flow toolboxes.

Session tracking

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.

Log rotation

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.

Background color

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.

Setting the background color Setting the background color

Text protocol

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.

Memory protocol

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.

View improvements

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.

View improvements View improvements

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.

Markers

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.

Markers Markers

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.

Named counters

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.

Watches Graph

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.

Watches Graph toolbox Watches Graph toolbox

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.

Custom protocols and actions

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.

Finding methods

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.

Go to Method dialog Go to Method dialog (click for larger image)

Miscellaneous Console options

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.

New font options Font related options

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.

New general options New general options

New log entry types and log level

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.

Multi value filtering input

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.

Multi value filtering input dialog Multi value filtering input dialog

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.

Support for Windows Vista, .NET 3.0 and Java 1.6

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.

All changes at a glance

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.

Libraries

  • Added: Full Unicode support
  • Added: Support for Microsoft Windows Vista
  • Added: Support for custom protocols and custom protocol actions
  • Added: Level option for protocols which limits a connection to log packets with a certain minimum log level
  • Added: Reconnect option for protocols which automatically initiates a reconnect when necessary
  • Added: Backlog/Flushon/KeepOpen options for the new protocol backlog functionality
  • Added: Text protocol for simple end-user notification purposes
  • Added: Memory protocol for writing logging data to memory and storing them in a user-supplied stream on demand
  • Added: Log rotation option for the file and text protocols
  • Added: Integer protocol options now support size units where applicable (e.g. "file(maxsize=2MB)")
  • Added: Level property for the packet classes
  • Added: Fatal log level, Fatal log entry type and the corresponding LogFatal methods including code snippets and templates
  • Added: New ConnectionsBuilder class (TSiConnectionsBuilder in Delphi) which assists in building a connections string at runtime
  • Added: Support for session tracking in the SmartInspect class (TSmartInspect in Delphi)
  • Added: Named counters with the IncCounter, DecCounter and ResetCounter methods for tracking increasing and decreasing values
  • Added: Version property/method in the SmartInspect class (TSmartInspect in Delphi) for retrieving the version number of the libraries at runtime
  • Added: Read-only Timestamp, ThreadId and ProcessId properties/methods for the Log Entry and Process Flow packet classes
  • Added: New Timestamp property/method for the Watch packet class and new timestamp field for the Watch packet format
  • Added: Conditional log entry type and related LogConditional methods
  • Added: Assert log entry type
  • Added: Support for Java 1.6 and .NET 3.0
  • Changed: Improved API documentation (more remarks, explanations, examples and links between topics)
  • Changed: LogAssert now uses the new Assert log entry type instead of the generic Error log entry type
  • Changed: Escaping of quote characters in connections string is now supported
  • Changed: The event system of the SmartInspect Java library now uses a single interface only (please see the knowledge base article for details)
  • Changed: Getting thread and process IDs in the packet constructors instead during write process now
  • Changed: Improved performance of TSiLookupTable class which is used by the protocol options and configuration handling (Delphi only)
  • Changed: Packets are now reference counted (Delphi only, necessary for the packet queue of the backlog functionality)
  • Fixed: Error events work now correctly when triggered recursively
  • Fixed: ProtocolOptions property of the ProtocolException class always reflects the correct protocol options now (Java only)
  • Fixed: Security exceptions are now handled properly in low-permission processes (.NET only)
  • Fixed: Hostname lookups now work correctly if IPv6 addresses are included in the result (.NET only)

Console

  • Added: Full Unicode support
  • Added: Support for Microsoft Windows Vista
  • Added: New toolbar in the View Categories toolbox
  • Added: New toolbar in the Process Flow toolbox
  • Added: Toolbar images for all toolboxes
  • Added: Arrow icon in the Call Stack toolbox which points to the first entry
  • Added: New Icons for Export and Forward
  • Added: Export and Forward actions have been integrated into toolbar
  • Added: Watches Graph toolbox for tracking and analyzing watches over time
  • Added: Set Background Color functionality which can set the background color of log entries
  • Added: Marker functionality for views and AutoView rules to automatically mark certain log entries
  • Added: View filters now support inverse filtering and filtering for log entry titles
  • Added: AutoView rules now have support for log entry types and inverse filtering as well
  • Added: Disabled filter combo boxes are now filled with the properties of the active log entry when adding or editing views
  • Added: Clone View to quickly add a new view with similar properties
  • Added: Clear View Rules functionality to quickly remove the filters of views
  • Added: New view selection menu for easier view navigation
  • Added: Close Other Views functionality to quickly delete multiple views at once
  • Added: Method field for the Details toolbox which displays the parent method of the focused log entry
  • Added: Time Span field for the Details toolbox which shows the elapsed time between the first and last selected log entries
  • Added: Display amount of selected log entries in the status bar
  • Added: The text box of Insert Comment and Edit Title now has a vertical scrollbar
  • Added: The Forward dialog now has a Browse for Computer button
  • Added: Encoding option (ANSI, Unicode, UTF-8) for the CSV export format
  • Added: The Details toolbox now allows to select multiple lines (useful for the copy to clipboard functionality)
  • Added: Links in the web viewer are now opened in the external default browser
  • Added: Save and View in Browser options for the web viewer
  • Added: Improved multi value filter input for views and AutoView rules with a new dialog
  • Added: Support for the new Assert, Conditional and Fatal log entry types
  • Added: "Only allow a single instance of the Console at the same time" option
  • Added: "Reset Console when minimizing to notification area" option
  • Added: "Ignore clear commands in log files" option
  • Added: Source viewer now has a word-wrap option
  • Added: Option for selecting the monospaced font and which areas should use a monospaced font
  • Added: External tools can now be accessed with keys just like the log files history
  • Added: Go to Method dialog to quickly jump to a certain method in the current view
  • Added: Support for Delete and Insert keys in lists where applicable (e.g. in the AutoView Rules list)
  • Added: Collapsed Enter Method Log Entries now display the child count
  • Added: Log Entry Details sub menu can now be accessed via the view popup menu
  • Changed: New modern look and feel including full support for ClearType
  • Changed: Redesigned wizards, message boxes and dialogs (especially when running under Microsoft Windows XP or Microsoft Windows Vista)
  • Changed: Moved some toolboxes to a View submenu
  • Changed: Tab header of views now have a maximal width (too long view names are cut accordingly)
  • Changed: The active project is now selected by default in the delete project dialog
  • Changed: Thread and process filter combo boxes are now sorted ordinal
  • Changed: Watches are now sorted in the Watches toolbox
  • Changed: Integer edit fields and combo boxes are now limited to meaningful maximal values (e.g. TCP port)
  • Changed: Improved AutoView rules and Clear AutoViews performance
  • Changed: Improved performance when scrolling through log entries
  • Changed: New manually created views are automatically activated now
  • Changed: Resized Connection Log dialog
  • Changed: The default docking layout now shows the Viewer and Process Flow toolbox side by side
  • Changed: Removed Customize functionality for menus and toolbars
  • Changed: Edit Title and Insert Comment are now disabled when a Separator or Reset Callstack log entry is selected
  • Changed: Improved column auto-sizing in the table viewer
  • Changed: Double-clicking on a column header in the table viewer now resizes the column
  • Changed: Shortcut for Options dialog is now Shift+Ctrl+O
  • Changed: The icons in the Watches toolbox have been redesigned
  • Changed: Improved foreground/background contrast when using log entries with background colors
  • Fixed: Enter and escape keys work now correctly in integer combo boxes
  • Fixed: Reduced flicker
  • Fixed: No viewer is shown anymore when a Separator and Reset Callstack log entry type is selected
  • Fixed: A possible Access Violation after deleting a view category has been removed
  • Fixed: Close View menu entry is now properly disabled in the View Categories toolbox if necessary
  • Fixed: Reset Console now works correctly after editing the title of a log entry
  • Fixed: The Console is now correctly refreshed when a file open operation takes a lot of time and the user clicks in the log entry area
  • Fixed: The toolbox states are now displayed correctly in the View menu if toolboxes are set to auto-hide
  • Fixed: Clicking on the tray icon in the notification now always restores the Console correctly
  • Fixed: The Title and Data viewer now always display the correct line count
  • Fixed: AutoView rules now correctly escape log entry properties when creating new views if necessary
  • Fixed: Printing now always outputs correctly formatted documents

Configuration Builder

  • Added: Full Unicode support
  • Added: Support for Microsoft Windows Vista
  • Added: Merged new library protocols and protocol options
  • Added: Fatal log level
  • Added: Support for Explorer file dropping
  • Added: Ctrl+A shortcut for selecting the text in the preview text box
  • Changed: New modern look and feel including full support for ClearType
  • Changed: Completely redesigned connection dialogs
  • Fixed: Protocol options in connection strings are now correctly escaped if necessary

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.