OrocosComponentLibrary  2.8.3
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Appender Class Reference
Inheritance diagram for Appender:
FileAppender GenerationalFileAppender OstreamAppender RollingFileAppender

Public Member Functions

 Appender (std::string name)
 
virtual bool configureLayout ()
 Optionally create a layout according to layoutName and layoutPattern. More...
 
virtual bool startHook ()
 ensure port is connected before we start More...
 
virtual void stopHook ()
 Drain the buffer.
 
virtual void drainBuffer ()
 Process all remaining events in buffer.
 

Protected Member Functions

virtual void processEvents (int n)
 Process up n events. More...
 

Protected Attributes

RTT::InputPort< OCL::logging::LoggingEventlog_port
 Port we receive logging events on Initially unconnected. More...
 
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)
 
unsigned int countMaxPopped
 

Detailed Description

Definition at line 16 of file Appender.hpp.

Member Function Documentation

bool configureLayout ( )
virtual

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 29 of file Appender.cpp.

void processEvents ( int  n)
protectedvirtual

Process up n events.

Parameters
nif 0 ==n then process events until buffer is empty, otherwise process at most n events
Precondition
0 <= n (otherwise acts as though n==1)

Definition at line 104 of file Appender.cpp.

References LoggingEvent::toLog4cpp().

bool startHook ( )
virtual

ensure port is connected before we start

Todo:
input ports must be connected?

Definition at line 69 of file Appender.cpp.

Member Data Documentation

RTT::InputPort<OCL::logging::LoggingEvent> log_port
protected

Port we receive logging events on Initially unconnected.

The logging service connects appenders.

Definition at line 47 of file Appender.hpp.

Referenced by Category::callAppenders(), and Category::connectToLogPort().


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