OrocosComponentLibrary  2.6.0
Public Member Functions | Protected Member Functions | Protected Attributes
FileAppender Class Reference
Inheritance diagram for FileAppender:
Appender

List of all members.

Public Member Functions

 FileAppender (std::string name)
virtual bool configureLayout ()
 Optionally create a layout according to layoutName and layoutPattern.
virtual bool startHook ()
 ensure port is connected before we start

Protected Member Functions

virtual bool configureHook ()
virtual void updateHook ()
virtual void cleanupHook ()

Protected Attributes

RTT::Property< std::string > filename_prop
 Name of file to append to.
RTT::Property< int > maxEventsPerCycle_prop
 Property to set maximum number of log events to pop per cycle.
int maxEventsPerCycle
 Maximum number of log events to pop per cycle.
RTT::InputPort
< OCL::logging::LoggingEvent
log_port
 Port we receive logging events on Initially unconnected.
log4cpp::Appender * appender
 Appender created by derived class.
RTT::Property< std::string > layoutName_prop
 Layout name (e.g. "simple", "basic", "pattern")
RTT::Property< std::string > layoutPattern_prop
 Layout conversion pattern (for those layouts that use a pattern)

Detailed Description

Definition at line 10 of file FileAppender.hpp.


Member Function Documentation

bool configureLayout ( ) [virtual, inherited]

Optionally create a layout according to layoutName and layoutPattern.

Precondition:
!appender, if you want a layout to actually be created
Returns:
true if not layout or no appender or a layout was created successfully, otherwise false
Todo:
ensure "" != layoutPattern?

Definition at line 28 of file Appender.cpp.

bool startHook ( ) [virtual, inherited]

ensure port is connected before we start

Todo:
input ports must be connected?

Definition at line 68 of file Appender.cpp.


Member Data Documentation

RTT::InputPort<OCL::logging::LoggingEvent> log_port [protected, inherited]

Port we receive logging events on Initially unconnected.

The logging service connects appenders.

Definition at line 34 of file Appender.hpp.

int 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 36 of file FileAppender.hpp.


The documentation for this class was generated from the following files: