rwlogo
HydraExpress 4.6

HydraExpress C++ API Reference Guide


   


Rogue Wave web site:  Home Page  |  Main Documentation Page

rwsf::LogLevelFilter Class Reference
[Core Logging]

Filters logging messages based on their log level. More...

#include <rwsf/core/LogLevelFilter.h>

Inherits rwsf::LoggerImp.

List of all members.


Detailed Description

This Logger implementation filters logging requests by whether they are at or below a specified log level threshold. To use it, you must specify ".createLogLevelFilter" in the logger configuration file. Under the logger definition, the following properties must be specified:

The threshold values map directly to log levels defined in the Logger::LogLevel enumeration.

Example of a filter definition in logger configuration file, typically loggers.xml:

  <logger name="logger1" class="rwsf_core.createFileLogger">
    <property name="filename" value="${RWSF_HOME}/logs/agent.log"/>
  </logger>
  <logger name="logger1.info" class="rwsf_core.createLogLevelFilter">
    <property name="logger" value="logger1"/>
    <property name="filter" value="info"/>
  </logger>

This filter would log any log message with the level "fatal", "error", "warn", or "info", and would block all others.


Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo are registered trademarks of Rogue Wave Software, and HydraExpress is a trademark of Rogue Wave Software. All other trademarks are the property of their respective owners.