OrocosComponentLibrary  2.7.0
LoggingService.hpp
00001 #ifndef LOGGINGSERVICE_HPP
00002 #define LOGGINGSERVICE_HPP 1
00003 
00004 #include <rtt/TaskContext.hpp>
00005 #include <rtt/PropertyBag.hpp>
00006 #include <rtt/Operation.hpp>
00007 
00008 namespace OCL {
00009 namespace logging {
00010 
00023 class LoggingService : public RTT::TaskContext
00024 {
00025 public:
00026     LoggingService(std::string name);
00027     virtual ~LoggingService();
00028     
00029     virtual bool configureHook();
00030 
00031     /* \todo
00032 
00033        configuration of this component
00034        - specify category for this component to log to
00035        - specify priority of logging of this component
00036 
00037        services for other components
00038        - method to set priority of any category
00039        - method to get priority of any category
00040        - method to log to a category
00041     */
00042 
00043 protected:
00044     // list of all category levels
00045     RTT::Property<RTT::PropertyBag>     levels_prop;
00046     // list of all category additivity values (0 == false == additivity off)
00047     RTT::Property<RTT::PropertyBag>     additivity_prop;
00048     // list of appenders per category
00049     RTT::Property<RTT::PropertyBag>     appenders_prop;
00050     // list of all active appenders
00051     std::vector<std::string>            active_appenders;
00055     RTT::Operation<void(void)>             logCategories_mtd;
00056     void logCategories();
00057 };
00058 
00059 // namespaces
00060 }
00061 }
00062 
00063 #endif