OrocosComponentLibrary  2.7.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Friends
Category Class Reference

A real-time capable category. More...

#include <Category.hpp>

List of all members.

Public Member Functions

virtual void log (log4cpp::Priority::Value priority, const RTT::rt_string &message) throw ()
void debug (const RTT::rt_string &message) throw ()
void info (const RTT::rt_string &message) throw ()
void notice (const RTT::rt_string &message) throw ()
void warn (const RTT::rt_string &message) throw ()
void error (const RTT::rt_string &message) throw ()
void crit (const RTT::rt_string &message) throw ()
void alert (const RTT::rt_string &message) throw ()
void emerg (const RTT::rt_string &message) throw ()
void fatal (const RTT::rt_string &message) throw ()
CategoryStream getRTStream (log4cpp::Priority::Value priority)
 Returns a stream-like object into which you can log arbitrary data which supports the operator<<().
bool connectToLogPort (RTT::base::PortInterface &otherPort)
 Connect otherPort to log_port.

Static Public Member Functions

static log4cpp::Category * createOCLCategory (const std::string &name, log4cpp::Category *parent, log4cpp::Priority::Value priority)
 Factory function for log4cpp::HierarchyMaintainer Creates an OCL logging category.

Protected Member Functions

void _logUnconditionally2 (log4cpp::Priority::Value priority, const RTT::rt_string &message) throw ()
 Category (const std::string &name, log4cpp::Category *parent, log4cpp::Priority::Value priority=log4cpp::Priority::NOTSET)
virtual void callAppenders (const OCL::logging::LoggingEvent &event) throw ()
 Send event to all attached appenders.

Static Protected Member Functions

static std::string convertName (const std::string &name)
 Convert name into Orocos notation (e.g.

Protected Attributes

RTT::OutputPort
< OCL::logging::LoggingEvent
log_port

Friends

class OCL::logging::LoggingService
 for access to log_port

Detailed Description

A real-time capable category.

Warning:
This class uses intentionally private inheritance to hide all functions with std::string in the base class. Only use RTT::rt_string objects.

Definition at line 20 of file Category.hpp.


Member Function Documentation

void _logUnconditionally2 ( log4cpp::Priority::Value  priority,
const RTT::rt_string &  message 
) throw () [protected]
Todo:
++numFailedLog

Definition at line 87 of file Category.cpp.

void callAppenders ( const OCL::logging::LoggingEvent event) throw () [protected, virtual]

Send event to all attached appenders.

Parameters:
eventThe event of interest
Note:
Real-time capable for all attached OCL-configured appenders

Definition at line 108 of file Category.cpp.

References Category::callAppenders().

Referenced by Category::callAppenders().

bool connectToLogPort ( RTT::base::PortInterface &  otherPort)

Connect otherPort to log_port.

Typically used by unit test code to directly syphon off logging events.

Returns:
true if connected sucessfully, otherwise false
Note:
No error is logged if fails to connect

Definition at line 154 of file Category.cpp.

std::string convertName ( const std::string &  name) [static, protected]

Convert name into Orocos notation (e.g.

"org.me.app" -> "org_me_app")

Warning:
Not real-time capable

Definition at line 124 of file Category.cpp.

log4cpp::Category * createOCLCategory ( const std::string &  name,
log4cpp::Category *  parent,
log4cpp::Priority::Value  priority 
) [static]

Factory function for log4cpp::HierarchyMaintainer Creates an OCL logging category.

Warning:
Not real-time capable

Definition at line 136 of file Category.cpp.


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