#include <GenerationalFileAppender.hpp>
Public Member Functions | |
GenerationalFileAppender (std::string name) | |
virtual | ~GenerationalFileAppender () |
Protected Member Functions | |
void | advanceGeneration () |
Advance to the next logfile generation. | |
virtual void | cleanupHook () |
Destroy appender. | |
virtual bool | configureHook () |
Create log4cpp appender. | |
virtual void | updateHook () |
Process at most maxEventsPerCycle event. | |
Protected Attributes | |
RTT::Operation< void(void)> | advanceGeneration_op |
RTT::Property< std::string > | filename_prop |
Name of file to append to. | |
int | maxEventsPerCycle |
RTT::Property< int > | maxEventsPerCycle_prop |
Appender supporting generations of log files
Each new generation is logged to a new file
Definition at line 14 of file GenerationalFileAppender.hpp.
OCL::logging::GenerationalFileAppender::GenerationalFileAppender | ( | std::string | name | ) |
Definition at line 12 of file GenerationalFileAppender.cpp.
Definition at line 27 of file GenerationalFileAppender.cpp.
void OCL::logging::GenerationalFileAppender::advanceGeneration | ( | ) | [protected] |
Advance to the next logfile generation.
Definition at line 67 of file GenerationalFileAppender.cpp.
void OCL::logging::GenerationalFileAppender::cleanupHook | ( | ) | [protected, virtual] |
Destroy appender.
Reimplemented from RTT::base::TaskCore.
Definition at line 57 of file GenerationalFileAppender.cpp.
bool OCL::logging::GenerationalFileAppender::configureHook | ( | ) | [protected, virtual] |
Create log4cpp appender.
Reimplemented from RTT::base::TaskCore.
Definition at line 31 of file GenerationalFileAppender.cpp.
void OCL::logging::GenerationalFileAppender::updateHook | ( | ) | [protected, virtual] |
Process at most maxEventsPerCycle event.
Reimplemented from RTT::base::TaskCore.
Definition at line 52 of file GenerationalFileAppender.cpp.
RTT::Operation<void(void)> OCL::logging::GenerationalFileAppender::advanceGeneration_op [protected] |
Definition at line 28 of file GenerationalFileAppender.hpp.
RTT::Property<std::string> OCL::logging::GenerationalFileAppender::filename_prop [protected] |
Name of file to append to.
Definition at line 33 of file GenerationalFileAppender.hpp.
int OCL::logging::GenerationalFileAppender::maxEventsPerCycle [protected] |
Maximum number of log events to pop per cycle
Defaults to 1.
A value of 0 indicates to not limit the number of events per cycle. With enough event production, this could lead to thread starvation!
Definition at line 48 of file GenerationalFileAppender.hpp.
Property to set maximum number of log events to pop per cycle
Definition at line 37 of file GenerationalFileAppender.hpp.