Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Introduction to HydraExpress
Rogue Wave web site:  Home Page  |  Main Documentation Page

6.2 Logging Fundamentals

The default logger is defined in the file <installdir>\conf\loggers.xml. Let's examine this file:

//1Creates a logger that writes to stdout at the level INFO or above (more critical). See below for more information on levels. Both the logger and the level filter can be created in a single entry for stdout and stderr.
//2Creates a rotating log file that allows you to set files size and number limitations, designate when log files should be archived and timestamped, and perform cleanup when old timestamped files should be removed. This section is currently commented out so that you can use the default log file writing functionality. If you wish to keep old log files, you can do so but also limit the size of the log files to keep by setting the measurement, measuresize, cleanup, logfilenum, and logdir values. To use this functionality, remove the comment tags from this section and comment out the default logger functionality just below it. The mode is append, which maintains log entries across Agent restarts.
//3To write to a file, you must first create a file logger, then define the filter in a subsequent entry. This logger writes to installdir\logs\agent.log, with a formatter that appends a timestamp to the entry, and a mode that creates a new, empty log every time the Agent is restarted. The alternative mode is append, which maintains log entries across Agent restarts.
//4Creates a filter for the file logger just defined that writes at the VERBOSE level or above.
//5Creates a logger that passes log messages to the two previously defined loggers. This is the default logger for the Agent.

The defined log levels are:

NONE

No logging

FATAL

Fatal messages only

ERROR

Error and Fatal

WARN

Warn, Error, and Fatal

INFO

Info, Warn, Error, and Fatal

VERBOSE

Verbose, Info, Warn, Error, and Fatal

DEBUG

Debug, Verbose, Info, Warn, Error, and Fatal

The default Agent logger is set to VERBOSE.



Previous fileTop of DocumentContentsIndex pageNext file

© Copyright Rogue Wave Software, Inc. All Rights Reserved. All Rights Reserved. Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. HydraExpress is a trademark of Rogue Wave Software, Inc. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.