Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
OCL::logging::LoggingService Class Reference

#include <LoggingService.hpp>

Inheritance diagram for OCL::logging::LoggingService:
Inheritance graph
[legend]

Public Member Functions

virtual bool configureHook ()
 
std::string getCategoryPriorityName (const std::string &name)
 
 LoggingService (std::string name)
 
bool setCategoryPriority (const std::string &name, const int priority)
 
virtual ~LoggingService ()
 
- Public Member Functions inherited from RTT::TaskContext
bool addAttribute (const std::string &name, T &attr)
 
bool addAttribute (base::AttributeBase &a)
 
bool addAttribute (base::AttributeBase &a)
 
bool addAttribute (const std::string &name, T &attr)
 
bool addConstant (const std::string &name, const T &attr)
 
bool addConstant (const std::string &name, const T &attr)
 
base::InputPortInterfaceaddEventPort (const std::string &name, base::InputPortInterface &port, SlotFunction callback=SlotFunction())
 
base::InputPortInterfaceaddEventPort (base::InputPortInterface &port, SlotFunction callback=SlotFunction())
 
Operation< Signature > & addOperation (Operation< Signature > &op)
 
Operation< Signature > & addOperation (Operation< Signature > &op)
 
Operation< typename internal::GetSignature< Func >::Signature > & addOperation (const std::string name, Func func, Service *serv, ExecutionThread et=ClientThread)
 
Operation< Signature > & addOperation (const std::string name, Signature *func, ExecutionThread et=ClientThread)
 
Operation< typename internal::GetSignature< Func >::Signature > & addOperation (const std::string name, Func func, Service *serv, ExecutionThread et=ClientThread)
 
Operation< Signature > & addOperation (const std::string name, Signature *func, ExecutionThread et=ClientThread)
 
virtual bool addPeer (TaskContext *peer, std::string alias="")
 
virtual bool addPeer (TaskContext *peer, std::string alias="")
 
base::PortInterfaceaddPort (const std::string &name, base::PortInterface &port)
 
base::PortInterfaceaddPort (base::PortInterface &port)
 
Property< T > & addProperty (const std::string &name, T &attr)
 
bool addProperty (base::PropertyBase &pb)
 
Property< T > & addProperty (const std::string &name, T &attr)
 
bool addProperty (base::PropertyBase &pb)
 
ConfigurationInterfaceattributes ()
 
ConfigurationInterfaceattributes ()
 
virtual void clear ()
 
virtual bool connectPeers (TaskContext *peer)
 
virtual bool connectPeers (TaskContext *peer)
 
virtual bool connectPorts (TaskContext *peer)
 
virtual bool connectServices (TaskContext *peer)
 
virtual bool connectServices (TaskContext *peer)
 
virtual void disconnect ()
 
virtual void disconnect ()
 
virtual void disconnectPeers (const std::string &name)
 
virtual void disconnectPeers (const std::string &name)
 
base::ActivityInterfacegetActivity ()
 
T * getActivity ()
 
base::AttributeBasegetAttribute (const std::string &name) const
 
base::AttributeBasegetAttribute (const std::string &name) const
 
virtual const std::string & getName () const
 
OperationInterfacePartgetOperation (std::string name)
 
OperationInterfacePartgetOperation (std::string name)
 
virtual TaskContextgetPeer (const std::string &peer_name) const
 
virtual TaskContextgetPeer (const std::string &peer_name) const
 
virtual PeerList getPeerList () const
 
virtual PeerList getPeerList () const
 
base::PortInterfacegetPort (const std::string &name) const
 
base::PropertyBasegetProperty (const std::string &name) const
 
base::PropertyBasegetProperty (const std::string &name) const
 
boost::shared_ptr< ServiceType > getProvider (const std::string &name)
 
boost::shared_ptr< ServiceType > getProvider (const std::string &name)
 
virtual bool hasPeer (const std::string &peer_name) const
 
virtual bool hasPeer (const std::string &peer_name) const
 
bool loadService (const std::string &service_name)
 
bool loadService (const std::string &service_name)
 
OperationInterfaceoperations ()
 
OperationInterfaceoperations ()
 
DataFlowInterfaceports ()
 
const DataFlowInterfaceports () const
 
PropertyBagproperties ()
 
PropertyBagproperties ()
 
Service::shared_ptr provides (const std::string &service_name)
 
Service::shared_ptr provides ()
 
Service::shared_ptr provides ()
 
Service::shared_ptr provides (const std::string &service_name)
 
virtual bool ready ()
 
virtual void removePeer (const std::string &name)
 
virtual void removePeer (TaskContext *peer)
 
virtual void removePeer (TaskContext *peer)
 
virtual void removePeer (const std::string &name)
 
ServiceRequester::shared_ptr requires (const std::string &service_name)
 
ServiceRequester::shared_ptr requires (const std::string &service_name)
 
ServiceRequester::shared_ptr requires ()
 
ServiceRequester::shared_ptr requires ()
 
bool setActivity (base::ActivityInterface *new_act)
 
virtual bool start ()
 
virtual bool stop ()
 
 TaskContext (const std::string &name, TaskState initial_state=Stopped)
 
virtual ~TaskContext ()
 
- Public Member Functions inherited from RTT::base::TaskCore
virtual bool activate ()
 
virtual bool activate ()
 
virtual bool cleanup ()
 
virtual bool cleanup ()
 
virtual bool configure ()
 
virtual bool configure ()
 
const ExecutionEngineengine () const
 
ExecutionEngineengine ()
 
virtual void error ()
 
virtual void error ()
 
virtual unsigned getCpuAffinity () const
 
virtual unsigned getCpuAffinity () const
 
unsigned int getCycleCounter () const
 
unsigned int getIOCounter () const
 
virtual Seconds getPeriod () const
 
virtual Seconds getPeriod () const
 
virtual TaskState getTargetState () const
 
virtual TaskState getTaskState () const
 
unsigned int getTimeOutCounter () const
 
unsigned int getTriggerCounter () const
 
virtual bool inException () const
 
virtual bool inException () const
 
virtual bool inFatalError () const
 
virtual bool inFatalError () const
 
virtual bool inRunTimeError () const
 
virtual bool inRunTimeError () const
 
virtual bool isActive () const
 
virtual bool isActive () const
 
virtual bool isConfigured () const
 
virtual bool isConfigured () const
 
virtual bool isRunning () const
 
virtual bool isRunning () const
 
virtual bool recover ()
 
virtual bool recover ()
 
virtual bool setCpuAffinity (unsigned cpu)
 
virtual bool setCpuAffinity (unsigned cpu)
 
virtual bool setPeriod (Seconds s)
 
virtual bool setPeriod (Seconds s)
 
 TaskCore (TaskState initial_state=Stopped, const std::string &name=std::string())
 
virtual bool trigger ()
 
virtual bool trigger ()
 
virtual bool update ()
 
virtual bool update ()
 
virtual ~TaskCore ()
 

Public Attributes

RTT::Operation< std::string(std::string)> getCategoryPriorityName_mtd
 
RTT::Attribute< int > level_ALERT_attr
 
RTT::Attribute< int > level_CRIT_attr
 
RTT::Attribute< int > level_DEBUG_attr
 
RTT::Attribute< int > level_EMERG_attr
 
RTT::Attribute< int > level_ERROR_attr
 
RTT::Attribute< int > level_FATAL_attr
 
RTT::Attribute< int > level_INFO_attr
 
RTT::Attribute< int > level_NOTICE_attr
 
RTT::Attribute< int > level_NOTSET_attr
 
RTT::Attribute< int > level_WARN_attr
 
RTT::Operation< bool(std::string, int)> setCategoryPriority_mtd
 
- Public Attributes inherited from RTT::base::TaskCore
 Exception
 
 FatalError
 
 Init
 
 PreOperational
 
 Running
 
 RunTimeError
 
 Stopped
 

Protected Member Functions

void logCategories ()
 
- Protected Member Functions inherited from RTT::TaskContext
virtual void dataOnPortCallback (base::PortInterface *port)
 
virtual bool dataOnPortHook (base::PortInterface *port)
 
void forceActivity (base::ActivityInterface *new_act)
 
- Protected Member Functions inherited from RTT::base::TaskCore
virtual bool breakUpdateHook ()
 
virtual void cleanupHook ()
 
virtual void errorHook ()
 
virtual void exception ()
 
virtual void exceptionHook ()
 
virtual void fatal ()
 
virtual bool startHook ()
 
virtual void stopHook ()
 
virtual void updateHook ()
 

Protected Attributes

std::vector< std::string > active_appenders
 
RTT::Property< RTT::PropertyBagadditivity_prop
 
RTT::Property< RTT::PropertyBagappenders_prop
 
RTT::Property< RTT::PropertyBaglevels_prop
 
RTT::Operation< void(void)> logCategories_mtd
 
- Protected Attributes inherited from RTT::base::TaskCore
ExecutionEngineee
 
unsigned int mCycleCounter
 
unsigned int mIOCounter
 
std::string mName
 
TaskState mTaskState
 
unsigned int mTimeOutCounter
 
unsigned int mTriggerCounter
 
bool mTriggerOnStart
 

Additional Inherited Members

- Public Types inherited from RTT::TaskContext
typedef std::vector< std::string > PeerList
 
typedef boost::function< void(base::PortInterface *)> SlotFunction
 
- Public Types inherited from RTT::base::TaskCore
enum  TaskState
 

Detailed Description

This component is responsible for reading the logging configuration setting up the logging categories and connecting to the appenders. You may have multiple LoggingService components, but each appender may only belong to one LoggingService. Usually, you'll only have one LoggingService per application.

Definition at line 23 of file LoggingService.hpp.

Constructor & Destructor Documentation

OCL::logging::LoggingService::LoggingService ( std::string  name)

Definition at line 19 of file LoggingService.cpp.

OCL::logging::LoggingService::~LoggingService ( )
virtual

Definition at line 56 of file LoggingService.cpp.

Member Function Documentation

bool OCL::logging::LoggingService::configureHook ( )
virtual

Reimplemented from RTT::base::TaskCore.

Definition at line 60 of file LoggingService.cpp.

std::string OCL::logging::LoggingService::getCategoryPriorityName ( const std::string &  name)

Get the priority name of category name

Returns
if category name exists and the priority of the category is known then the descriptive name (e.g. "INFO") of the priority, otherwise if the category name exists but the priority is not known then "UNKNOWN PRIORITY", otherwise "UNKNOWN CATEGORY"

Definition at line 259 of file LoggingService.cpp.

void OCL::logging::LoggingService::logCategories ( )
protected

Definition at line 282 of file LoggingService.cpp.

bool OCL::logging::LoggingService::setCategoryPriority ( const std::string &  name,
const int  priority 
)

Set the priority of category name to priority If the category does not exist then an error is logged and nothing else occurs.

Parameters
nameCategory name
priorityPriority level (one of level_XXX_attr)
Returns
true if category name exists and the category was set, otherwise false

Definition at line 236 of file LoggingService.cpp.

Member Data Documentation

std::vector<std::string> OCL::logging::LoggingService::active_appenders
protected

Definition at line 83 of file LoggingService.hpp.

RTT::Property<RTT::PropertyBag> OCL::logging::LoggingService::additivity_prop
protected

Definition at line 79 of file LoggingService.hpp.

RTT::Property<RTT::PropertyBag> OCL::logging::LoggingService::appenders_prop
protected

Definition at line 81 of file LoggingService.hpp.

RTT::Operation<std::string(std::string)> OCL::logging::LoggingService::getCategoryPriorityName_mtd

Get the priority name of category name

Returns
if category name exists and the priority of the category is known then the descriptive name (e.g. "INFO") of the priority, otherwise if the category name exists but the priority is not known then "UNKNOWN PRIORITY", otherwise "UNKNOWN CATEGORY"

Definition at line 66 of file LoggingService.hpp.

RTT::Attribute<int> OCL::logging::LoggingService::level_ALERT_attr

Definition at line 44 of file LoggingService.hpp.

RTT::Attribute<int> OCL::logging::LoggingService::level_CRIT_attr

Definition at line 45 of file LoggingService.hpp.

RTT::Attribute<int> OCL::logging::LoggingService::level_DEBUG_attr

Definition at line 50 of file LoggingService.hpp.

RTT::Attribute<int> OCL::logging::LoggingService::level_EMERG_attr

Definition at line 42 of file LoggingService.hpp.

RTT::Attribute<int> OCL::logging::LoggingService::level_ERROR_attr

Definition at line 46 of file LoggingService.hpp.

RTT::Attribute<int> OCL::logging::LoggingService::level_FATAL_attr

Definition at line 43 of file LoggingService.hpp.

RTT::Attribute<int> OCL::logging::LoggingService::level_INFO_attr

Definition at line 49 of file LoggingService.hpp.

RTT::Attribute<int> OCL::logging::LoggingService::level_NOTICE_attr

Definition at line 48 of file LoggingService.hpp.

RTT::Attribute<int> OCL::logging::LoggingService::level_NOTSET_attr

Definition at line 51 of file LoggingService.hpp.

RTT::Attribute<int> OCL::logging::LoggingService::level_WARN_attr

Definition at line 47 of file LoggingService.hpp.

RTT::Property<RTT::PropertyBag> OCL::logging::LoggingService::levels_prop
protected

Definition at line 77 of file LoggingService.hpp.

RTT::Operation<void(void)> OCL::logging::LoggingService::logCategories_mtd
protected

Log all categories

Warning
Not realtime!

Definition at line 87 of file LoggingService.hpp.

RTT::Operation<bool(std::string,int)> OCL::logging::LoggingService::setCategoryPriority_mtd

Set the priority of category name to priority If the category does not exist then an error is logged and nothing else occurs.

Parameters
nameCategory name
priorityPriority level (one of level_XXX_attr)
Returns
true if category name exists and the category was set, otherwise false

Definition at line 54 of file LoggingService.hpp.


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


ocl
Author(s): OCL Development Team
autogenerated on Mon Mar 23 2020 04:47:20