Manual Reference Pages - SP-ERROR-VISUALIZER (1)


sp-error-visualizer - tool to display errors as banners




sp-error-visualizer [-s] [-m FILE] [-f FILE | PATTERNS]


The sp-error-visualizer provides a way of displaying text content (optionally filtered against a set of patterns) as banners. The primary purpose of this tool is to provide a way to display various error messages from syslog in a more easily visible manner to the developers and testers.

All data to be potentially displayed is received either via the standard input, reading directly from the logfile or via syslog socket (useful if the environment does not have a syslog daemon). The default source is the standard input. By default no input filtering is done. Invividual messages are terminated by linefeeds in addition to the usual NULL termination. Additionally, messages longer than 256 bytes will be truncated to that limit.

Currently, a maximum of 256 matching patterns are supported. The patterns can be provided either from a file (see -f option below) or as a series of arguments. When reading from file, some preprocessing will be done:

o Patterns lines starting with '#' are interprepted as comments and ignored.

o Empty lines will be ignored.

o Whitespace is preserved in the patterns and will also be used in matching.

This package includes an initscript for a convenient way to start and stop the displaying of errors and other interesting messages from syslog with a preconfigured set of matching rules. The initscript also tries to autodetect the correct source for the logging information.

com This manual page was written by Eero Tamminen <eero.tamminen@nokia.com>.


A summary of options is included below. For a complete description, see the source code.

-f FILE Read the filtering patterns from a file.
-s Use syslog socket instead of the syslog daemon logfile to receive messages. However, attempts to use this option will fail if a logfile can be found.
-m FILE Read logs from the specified file directly. The specified file is also monitored for deletion and moving events by using inotify. When such event is detected, the file is automatically reopened. This can't be used with -s, as in that mode syslog files are not used. This option is provided as a workaround for environments without a version of tail that can follow a file based on name instead of a file descriptor, as in that case tail will not notice the log rotation and ceases to provide sp-error-visualizer any further messages to display.



An example set of known-good filtering rules to use with the -f option. /var/run/sp-error-visualizer.pid

When started via the provided initscript, this file contains the PID of syslog-displaying sp-error-visualizer instance. /var/run/sp-error-visualizer-syslog-sock

When the /dev/log (i.e. syslog socket) is created by sp-error-visualizer, this file is created to indicate that removing the syslog socket is the responsibility of sp-error-visualizer when shutting down.


Copyright (C) 2007 Nokia Corporation.

This is free software. You may redistribute copies of it under the terms of the GNU General Public License v2 included with the software. There is NO WARRANTY, to the extent permitted by law.

Improve this page