Prepend a counter number to each displayed log entry.
-parseAll
Parses and display the entire contents of a file before displaying the real-time updates.
-ansi level attribute
Display events and filters using ANSI-specified colors
where
level is a logging level, such as debug
attribute is an ANSI color attribute, such as 42m to specify the color green
-quit
Quit LogViewer after parsing the log files.
Table 4-3: LogViewer CLI startup parameters
Parameter
Meaning
-xml file_name
Read information such as log file, plug-in and filter specifications from the XML file specified by file_name. The LogViewer GUI can export this information to an XML file.
file name
Display the specified file when LogViewer starts.
The LogViewer CLI opens in display mode. If a log file is specified as a startup parameter, the most recent entries in the log file are displayed as they are written to the log file. Otherwise, a cursor is displayed.
4
Enter command mode by pressing ↵. The following prompt is displayed:
log>
This prompt is called the root prompt. The table below describes the options that are available at the root prompt.
Table 4-4: LogViewer CLI root menu options
Option
Function
open
opens a submenu for choosing the logs to view
include
opens a submenu for specifying which log files to list in the open submenu
filter
opens a submenu for adding, listing or deleting filters
plugin
opens a submenu for adding, listing or delete plugins
options
opens a submenu for configuring LogViewer CLI and GUI options
list
lists the files in the open submenu file list
reset
resets the log message counts
stats
displays LogViewer statistics for the current log
The following options are also available in submenus:
back
goes to the previous menu
root
goes to the root menu
quit
quits LogViewer
return
returns to display mode
5
Enter the following:
open ↵
The following prompt is displayed:
log-open>
6
Press ↵ to display the list of available logs.
7
Perform one of the following:
To view a log in the list, enter the name of a log and press ↵.
To view a log that is not listed, perform the following steps.
Enter the following:
other ↵
The following prompt is displayed:
File Name (full path)?
Enter the absolute or relative path of the log file that you want to open and press ↵. LogViewer opens the file.
8
Enter the following to enter display mode and view the real-time log updates:
return ↵
LogViewer enters display mode. Log updates are displayed as they occur.
9
To add a filter that restricts the types of log entries that are displayed during the current LogViewer session, perform the following steps:
Press ↵ to enter command mode.
Enter the following to return to the root menu:
root ↵
The following prompt is displayed:
log>
Enter the following:
filter ↵
The following prompt is displayed:
log-filter>
Note:
You can also use commands at this menu level to list and delete filters.
Enter the following:
add ↵
The following prompt is displayed:
Filter name:
Enter a name for the filter and press ↵.
The following prompts are displayed in sequence:
Level:
Logger:
Thread:
Timestamp:
Message:
At each prompt, enter a regular expression to use as a match criterion, if required, and press ↵.
The following prompt is displayed:
Display Filter? (Y/N):
Enter y ↵ to apply the filter to the current log display. LogViewer applies the filter.
Enter the following to return to display mode:
return ↵
LogViewer enters display mode. The log updates are filtered before they are displayed.
10
To list the available log files, perform the following steps:
Press ↵ to enter command mode.
Enter the following:
list ↵
LogViewer lists the available log files.
Enter the following to return to display mode:
return ↵
11
To display statistics about the current LogViewer session, perform the following steps:
Press ↵ to enter command mode.
Enter the following:
stats ↵
LogViewer displays statistics about the current session.
Enter the following to return to display mode:
return ↵
12
To reset the statistics counters for the current LogViewer session, perform the following steps: