OrocosComponentLibrary  2.8.3
GenerationalFileAppender.hpp
1 #ifndef GENERATIONALFILEAPPENDER_HPP
2 #define GENERATIONALFILEAPPENDER_HPP 1
3 
4 #include "Appender.hpp"
5 #include <rtt/Property.hpp>
6 
7 namespace OCL {
8 namespace logging {
9 
15 {
16 public:
17  GenerationalFileAppender(std::string name);
18  virtual ~GenerationalFileAppender();
19 protected:
21  virtual bool configureHook();
23  virtual void updateHook();
25  virtual void cleanupHook();
26 
28  RTT::Operation<void(void)> advanceGeneration_op;
30  void advanceGeneration();
31 
33  RTT::Property<std::string> filename_prop;
37  RTT::Property<int> maxEventsPerCycle_prop;
38 
49 };
50 
51 // namespaces
52 }
53 }
54 
55 #endif
void advanceGeneration()
Advance to the next logfile generation.
virtual void updateHook()
Process at most maxEventsPerCycle event.
virtual bool configureHook()
Create log4cpp appender.
The Orocos Component Library.
Definition: Component.hpp:43
virtual void cleanupHook()
Destroy appender.
int maxEventsPerCycle
Maximum number of log events to pop per cycle.
RTT::Property< int > maxEventsPerCycle_prop
Property to set maximum number of log events to pop per cycle.
RTT::Property< std::string > filename_prop
Name of file to append to.
Appender supporting generations of log files.