Log4j project - LogFactor5 Features Users' Guide

LF5 User Guide Overview Features Reading Files Configuration Library Examples Troubleshoot FAQ Log4j Project Home page |
LogFactor5 Features
### Manage Log Messages The Log Table pane shows the listing of LogRecords that have been sent to the LogFactor5 appender. The newest log messages appear at the bottom of the table. #### Log Level Selection The LogFactor5 toolbar applies directly to the Log Table area. Log levels can be toggled on and off to filter out messages that you want to view or hide. Levels include FATAL, ERROR, WARN, INFO and DEBUG. Log Level Color Configuration To help distiguish the various log events displayed in the LogTable, LogFactor5 allows users to set the colors of their log events based on level. #### Full Text Searching The Log Table supports full text searching. To perform a search, choose Edit->Find from the menu bar or CTRL-F and then enter the text you want to search for. LogFactor5 will find any strings that are an exact match for the string you entered. Pressing F3 will find the next occurrence of the string. #### Log Table Views The Log Table has three views; compact, standard and detailed. The compact view only displays the Nested Diagnostic Context (NDC), logger and message. The standard view is the default view, and displays the level, NDC, logger and message of the logging event. The detailed view displays, in addition, the date, message number, location (i.e. the method that is logging the message), thread description and the throwable. The view selector on the toolbar switches between the three views. Columns in the Log Table can be re-sized and moved by interacting with the column headers. #### Log Record Details The Log Record Detail area displays all of the attributes of the LogRecord which is selected in the Log Table. When a row, or LogRecord, is selected in the Log Table, the complete details of that LogRecord are displayed in the LogRecord Detail area, independent of the view in effect. #### Logger Explorer The Logger Explorer area enables the filtering of incoming log messages based on logger. If a logger is deselected (no checkmark is shown next to it) then new messages on that logger will not be displayed. The Logger Explorer has no effect on log messages already in the Log Table. The Logger Explorer displays loggers in a hierarchical tree-like fashion. Loggers are identified with dot-separated names similar to Java package and class names. The name components are mapped to the levels in the hierarchy in the Logger Explorer. For example, the logger name org.apache.applications.log4j.InitUsing Log4JProperties is displayed below: #### Selecting and Deselecting Loggers When a logger in a hierarchy is deselected, no messages at that level or below will appear in the Log Table. For example, if just the first InitUsingMultipleAppenders logger in the examples.InitUsingMultipleAppenders.InitUsingMultipleAppenders logger is deselected, then messages with the logger examples would be displayed in the Log Table, but messages with the logger InitUsingMultipleAppenders.InitUsingMultipleAppenders would be filtered and not displayed in the Log Table. To quickly select or deselect loggers in the hierarchy, the right-mouse button can be used to bring up the pop-up menu displayed below. #### Expanding and Collapsing the Logger Tree You can also expand and collapse the hierarchy tree using the pop-up menu displayed below. #### NDC Record Filtering Log4j provides a lightweight technique for stamping log requests initiated from the same client within a multithreaded system. The Nested Diagnostic Context (NDC) provides an easy way to differentiate logging output of one client from another. The NDC is also useful for differentiating log messages being output by different members of a large development team building an application on the same server. To improve the sorting of potentially thousands of log records being output from multiple clients, a NDC filter has been provided. To use the NDC filter, select the Edit menu item and choose 'Sort by NDC'. Fill in the name of the NDC you would like to filter on. All records containing the filter key word will be displayed in the Log Table. To restore all of the log records use the Edit -> Restore all NDC's. You can also use the Edit->Find feature to locate NDC's without removing log records from the Log Table. Furthermore, you can use the Configure->Save feature to persist the last NDC filter key word that was used. Note however that restoring all NDCs will effectively erase the NDC filter key word. Refer to the Configuration section below for more information on saving NDC filter key words. ### Read Log Files #### Read a File LogFactor5 supports reading in log files that were created using log4j's RollingFileAppender. The benefit of this feature is that developers who run utilities like Ant to test their applications can now view their log files off-line (i.e. after their application has completed the test and the JVM has shut down). Reading log files currently only works for files written a LogFactor5's unique ConversionPattern. For more information on setting the LogFactor5 conversion pattern, please see the OpeningLogFiles example. To open a file and read it into LogFactor5, you need to start the logging console using the StartLogFactor5Console.bat file provided in the bin directory. Once the console is open, choose File->Open from the menu at the top of the GUI. #### Read a File From a URL LogFactor5 supports reading log files created using log4j from a URL. Having the ability to open log files on a remote server provides the ability for multiple developers working on the same application to view log files independently. It also gives developers the ability to view log files both internally and from remote locations. Reading log files currently only works for files written a LogFactor5's unique ConversionPattern. For more information on setting the LogFactor5 conversion pattern, please see the OpeningLogFiles example. To open a file and read it into LogFactor5, you need to start the logging console using the StartLogFactor5Console.bat file provided in the bin directory. Once the console is open, choose File->Open URL from the menu at the top of the GUI. << Return to Top of Page >> ### Configuration #### Save Configuration Information LogFactor5 allows you to save your current configuration. When you choose the Configuration->Save option from the menu at the top of the GUI, the loggers and levels that you currently have selected, along with the last NDC filter key word used (assuming 'Restore all NDC's' has not been selected), are saved to your local file system. This means that the next time you start up the console you will not need to reselect the loggers, levels, and NDC filter that you would like used for filtering. LogFactor5 also allows you to remove your saved configuration, and to configure the maximum number of records that will be displayed at any time in the logging console. Setting the maximum number of records to display allows you to optimize LogFactor5's performance for your system. The maximum number of records can also be configured via a log4j properties file.
Copyright © 1999-2002, Apache Software Foundation