HydraExpress™ C++ API Reference Guide

Product Documentation:
   HydraExpress C++
Documentation Home
List of all members
rwsf::LogLevelFilter Class Reference

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

#include <rwsf/core/LogLevelFilter.h>

Inherits rwsf::LoggerImp.

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 © 2019 Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is registered trademark of Rogue Wave Software, Inc. in the United States and other countries, and HydraExpress is a trademark of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.