rwlogo
HydraExpress 4.6

HydraExpress C++ API Reference Guide


   


Rogue Wave web site:  Home Page  |  Main Documentation Page

rwsf::LogRotatingFileWriter Class Reference
[Core Logging]

Provides the ability to define a rotating logger to control file size. More...

#include <rwsf/core/LogRotatingFileWriter.h>

Inheritance diagram for rwsf::LogRotatingFileWriter:
rwsf::LogFileWriter

List of all members.


Detailed Description

This Logger implementation writes to a file until the file reaches a specified size, and then moves the log file aside and writes to a new file, again until the specified size is reached. The parameters for the size of the file, the location of the historical backups, and the number of historical backups to keep before deleting old ones, are all configurable. To use this logger, you must specify ".createRotatingFileLogger" in the logger configuration file, typically loggers.xml. In the logger definition, the following properties must be specified:

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

  <logger name="rotating.log" class="rwsf_core.createRotatingFileLogger">
    <property name="filename" value="${RWSF_HOME}/logs/agent.log"/>   
    <property name="formatter" value="rwsf_core.createLogTimeFormatter"/>
    <property name="mode" value="append"/>
    <property name="measurement" value="mb"/>
    <property name="measuresize" value="1"/>
    <property name="cleanup" value="y"/>
    <property name="logfilenum" value="10"/>
    <property name="logdir" value="${RWSF_HOME}/logs"/>
  </logger>

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.