component.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef __UTILS_LOGGING_COMPONENT_H_
00025 #define __UTILS_LOGGING_COMPONENT_H_
00026
00027 #include <core/exception.h>
00028 #include <string>
00029
00030 namespace fawkes {
00031
00032
00033 class Logger;
00034
00035 class ComponentLogger
00036 {
00037 public:
00038 ComponentLogger(Logger *logger, const char *component);
00039 ~ComponentLogger();
00040
00041 void log_debug(const char *format, ...);
00042 void log_info(const char *format, ...);
00043 void log_warn(const char *format, ...);
00044 void log_error(const char *format, ...);
00045
00046 void log_debug(std::string message);
00047 void log_info(std::string message);
00048 void log_warn(std::string message);
00049 void log_error(std::string message);
00050
00051 void log_debug(Exception &e);
00052 void log_info(Exception &e);
00053 void log_warn(Exception &e);
00054 void log_error(Exception &e);
00055
00056 private:
00057 Logger *__logger;
00058 char *__component;
00059 };
00060
00061
00062 }
00063
00064 #endif
00065