|
Fawkes API
Fawkes Development Version
|
Logging Cache. More...
#include <>>

Classes | |
| struct | CacheEntry |
| Cache entry struct. More... | |
Public Member Functions | |
| CacheLogger (unsigned int num_entries=20, LogLevel log_level=LL_DEBUG) | |
| Constructor. More... | |
| virtual | ~CacheLogger () |
| Destructor. More... | |
| virtual void | log_debug (const char *component, const char *format,...) |
| Log debug message. More... | |
| virtual void | log_info (const char *component, const char *format,...) |
| Log informational message. More... | |
| virtual void | log_warn (const char *component, const char *format,...) |
| Log warning message. More... | |
| virtual void | log_error (const char *component, const char *format,...) |
| Log error message. More... | |
| virtual void | vlog_debug (const char *component, const char *format, va_list va) |
| Log debug message. More... | |
| virtual void | vlog_info (const char *component, const char *format, va_list va) |
| Log informational message. More... | |
| virtual void | vlog_warn (const char *component, const char *format, va_list va) |
| Log warning message. More... | |
| virtual void | vlog_error (const char *component, const char *format, va_list va) |
| Log error message. More... | |
| virtual void | log_debug (const char *component, Exception &e) |
| Log debug exception. More... | |
| virtual void | log_info (const char *component, Exception &e) |
| Log informational exception. More... | |
| virtual void | log_warn (const char *component, Exception &e) |
| Log warning exception. More... | |
| virtual void | log_error (const char *component, Exception &e) |
| Log error exception. More... | |
| virtual void | tlog_debug (struct timeval *t, const char *component, const char *format,...) |
| Log debug message for specific time. More... | |
| virtual void | tlog_info (struct timeval *t, const char *component, const char *format,...) |
| Log informational message for specific time. More... | |
| virtual void | tlog_warn (struct timeval *t, const char *component, const char *format,...) |
| Log warning message for specific time. More... | |
| virtual void | tlog_error (struct timeval *t, const char *component, const char *format,...) |
| Log error message for specific time. More... | |
| virtual void | tlog_debug (struct timeval *t, const char *component, Exception &e) |
| Log debug exception for specific time. More... | |
| virtual void | tlog_info (struct timeval *t, const char *component, Exception &e) |
| Log informational exception for specific time. More... | |
| virtual void | tlog_warn (struct timeval *t, const char *component, Exception &e) |
| Log warning exception for specific time. More... | |
| virtual void | tlog_error (struct timeval *t, const char *component, Exception &e) |
| Log error exception for specific time. More... | |
| virtual void | vtlog_debug (struct timeval *t, const char *component, const char *format, va_list va) |
| Log debug message for specific time. More... | |
| virtual void | vtlog_info (struct timeval *t, const char *component, const char *format, va_list va) |
| Log informational message for specific time. More... | |
| virtual void | vtlog_warn (struct timeval *t, const char *component, const char *format, va_list va) |
| Log warning message for specific time. More... | |
| virtual void | vtlog_error (struct timeval *t, const char *component, const char *format, va_list va) |
| Log error message for specific time. More... | |
| std::list< CacheEntry > & | get_messages () |
| Get messages. More... | |
| void | clear () |
| Clear messages. More... | |
| unsigned int | size () const |
| Get maximum number of log entries in cache. More... | |
| void | set_size (unsigned int new_size) |
| Set maximum number of log entries in cache. More... | |
| void | lock () |
| Lock cache logger, no new messages can be added. More... | |
| void | unlock () |
| Unlock cache logger. More... | |
Public Member Functions inherited from fawkes::Logger | |
| Logger (LogLevel log_level=LL_DEBUG) | |
| Constructor. More... | |
| virtual | ~Logger () |
| Virtual empty destructor. More... | |
| virtual void | set_loglevel (LogLevel level) |
| Sets the log level. More... | |
| virtual LogLevel | loglevel () |
| Get log level. More... | |
| virtual void | log (LogLevel level, const char *component, const char *format,...) |
| Log message of given log level. More... | |
| virtual void | log (LogLevel level, const char *component, Exception &e) |
| Log exception for given log level. More... | |
| virtual void | vlog (LogLevel level, const char *component, const char *format, va_list va) |
| Log message for given log level. More... | |
| virtual void | tlog (LogLevel level, struct timeval *t, const char *component, const char *format,...) |
| Log message of given log level and time. More... | |
| virtual void | tlog (LogLevel level, struct timeval *t, const char *component, Exception &e) |
| Log exception for given log level. More... | |
| virtual void | vtlog (LogLevel level, struct timeval *t, const char *component, const char *format, va_list va) |
| Log message for given log level and time. More... | |
Additional Inherited Members | |
Public Types inherited from fawkes::Logger | |
| enum | LogLevel { LL_DEBUG = 0 , LL_INFO = 1 , LL_WARN = 2 , LL_ERROR = 4 , LL_NONE = 8 } |
| Log level. More... | |
Protected Attributes inherited from fawkes::Logger | |
| LogLevel | log_level |
| Minimum log level. More... | |
Logging Cache.
The CacheLogger will cache the log messages. By default these are 20 messages.
| void fawkes::CacheLogger::clear | ( | void | ) |
Clear messages.
Definition at line 71 of file cache.cpp.
References fawkes::Mutex::lock(), and fawkes::Mutex::unlock().
Referenced by XmlRpcThread::init().
| std::list< CacheLogger::CacheEntry > & fawkes::CacheLogger::get_messages | ( | ) |
Get messages.
Definition at line 65 of file cache.cpp.
Referenced by XmlRpcLogMethods::log_entries::execute().
| void fawkes::CacheLogger::lock | ( | ) |
Lock cache logger, no new messages can be added.
Use with care, can cause critical delays in the whole software stack!
Definition at line 106 of file cache.cpp.
References fawkes::Mutex::lock().
Referenced by XmlRpcLogMethods::log_entries::execute(), and set_size().
|
virtual |
Log debug message.
| component | component, used to distuinguish logged messages |
| format | format of the message, see man page of sprintf for available tokens. |
Implements fawkes::Logger.
Definition at line 227 of file cache.cpp.
References fawkes::Logger::LL_DEBUG.
|
virtual |
Log debug exception.
| component | component, used to distuinguish logged messages |
| e | exception to log, exception messages will be logged |
Implements fawkes::Logger.
Definition at line 263 of file cache.cpp.
References fawkes::Logger::LL_DEBUG.
|
virtual |
Log error message.
| component | component, used to distuinguish logged messages |
| format | format of the message, see man page of sprintf for available tokens. |
Implements fawkes::Logger.
Definition at line 254 of file cache.cpp.
References fawkes::Logger::LL_ERROR.
|
virtual |
Log error exception.
| component | component, used to distuinguish logged messages |
| e | exception to log, exception messages will be logged |
Implements fawkes::Logger.
Definition at line 281 of file cache.cpp.
References fawkes::Logger::LL_ERROR.
|
virtual |
Log informational message.
| component | component, used to distuinguish logged messages |
| format | format of the message, see man page of sprintf for available tokens. |
Implements fawkes::Logger.
Definition at line 236 of file cache.cpp.
References fawkes::Logger::LL_INFO.
|
virtual |
Log informational exception.
| component | component, used to distuinguish logged messages |
| e | exception to log, exception messages will be logged |
Implements fawkes::Logger.
Definition at line 269 of file cache.cpp.
References fawkes::Logger::LL_INFO.
|
virtual |
Log warning message.
| component | component, used to distuinguish logged messages |
| format | format of the message, see man page of sprintf for available tokens. |
Implements fawkes::Logger.
Definition at line 245 of file cache.cpp.
References fawkes::Logger::LL_WARN.
|
virtual |
Log warning exception.
| component | component, used to distuinguish logged messages |
| e | exception to log, exception messages will be logged |
Implements fawkes::Logger.
Definition at line 275 of file cache.cpp.
References fawkes::Logger::LL_WARN.
| void fawkes::CacheLogger::set_size | ( | unsigned int | new_size | ) |
Set maximum number of log entries in cache.
| new_size | new size |
Definition at line 92 of file cache.cpp.
References lock().
Referenced by XmlRpcLogMethods::log_set_size::execute().
| unsigned int fawkes::CacheLogger::size | ( | ) | const |
Get maximum number of log entries in cache.
Definition at line 83 of file cache.cpp.
Referenced by XmlRpcLogMethods::log_get_size::execute().
|
virtual |
Log debug message for specific time.
| t | time for this message to log |
| component | component, used to distuinguish logged messages |
| format | format of the message, see man page of sprintf for available tokens. |
Implements fawkes::Logger.
Definition at line 369 of file cache.cpp.
References fawkes::Logger::LL_DEBUG.
|
virtual |
Log debug exception for specific time.
| t | time for this message to log |
| component | component, used to distuinguish logged messages |
| e | exception to log, exception messages will be logged |
Implements fawkes::Logger.
Definition at line 405 of file cache.cpp.
References fawkes::Logger::LL_DEBUG.
|
virtual |
Log error message for specific time.
| t | time for this message to log |
| component | component, used to distuinguish logged messages |
| format | format of the message, see man page of sprintf for available tokens. |
Implements fawkes::Logger.
Definition at line 396 of file cache.cpp.
References fawkes::Logger::LL_ERROR.
|
virtual |
Log error exception for specific time.
| t | time for this message to log |
| component | component, used to distuinguish logged messages |
| e | exception to log, exception messages will be logged |
Implements fawkes::Logger.
Definition at line 423 of file cache.cpp.
References fawkes::Logger::LL_ERROR.
|
virtual |
Log informational message for specific time.
| t | time for this message to log |
| component | component, used to distuinguish logged messages |
| format | format of the message, see man page of sprintf for available tokens. |
Implements fawkes::Logger.
Definition at line 378 of file cache.cpp.
References fawkes::Logger::LL_INFO.
|
virtual |
Log informational exception for specific time.
| t | time for this message to log |
| component | component, used to distuinguish logged messages |
| e | exception to log, exception messages will be logged |
Implements fawkes::Logger.
Definition at line 411 of file cache.cpp.
References fawkes::Logger::LL_INFO.
|
virtual |
Log warning message for specific time.
| t | time for this message to log |
| component | component, used to distuinguish logged messages |
| format | format of the message, see man page of sprintf for available tokens. |
Implements fawkes::Logger.
Definition at line 387 of file cache.cpp.
References fawkes::Logger::LL_WARN.
|
virtual |
Log warning exception for specific time.
| t | time for this message to log |
| component | component, used to distuinguish logged messages |
| e | exception to log, exception messages will be logged |
Implements fawkes::Logger.
Definition at line 417 of file cache.cpp.
References fawkes::Logger::LL_WARN.
| void fawkes::CacheLogger::unlock | ( | ) |
Unlock cache logger.
Definition at line 113 of file cache.cpp.
References fawkes::Mutex::unlock().
Referenced by XmlRpcLogMethods::log_entries::execute().
|
virtual |
Log debug message.
| component | component, used to distuinguish logged messages |
| format | format of the message, see man page of sprintf for available tokens. |
| va | variable argument list |
Implements fawkes::Logger.
Definition at line 203 of file cache.cpp.
References fawkes::Logger::LL_DEBUG.
|
virtual |
Log error message.
| component | component, used to distuinguish logged messages |
| format | format of the message, see man page of sprintf for available tokens. |
| va | variable argument list |
Implements fawkes::Logger.
Definition at line 221 of file cache.cpp.
References fawkes::Logger::LL_ERROR.
|
virtual |
Log informational message.
| component | component, used to distuinguish logged messages |
| format | format of the message, see man page of sprintf for available tokens. |
| va | variable argument list |
Implements fawkes::Logger.
Definition at line 209 of file cache.cpp.
References fawkes::Logger::LL_INFO.
|
virtual |
Log warning message.
| component | component, used to distuinguish logged messages |
| format | format of the message, see man page of sprintf for available tokens. |
| va | variable argument list |
Implements fawkes::Logger.
Definition at line 215 of file cache.cpp.
References fawkes::Logger::LL_WARN.
|
virtual |
Log debug message for specific time.
| t | time for this message to log |
| component | component, used to distuinguish logged messages |
| format | format of the message, see man page of sprintf for available tokens. |
| va | variable argument list |
Implements fawkes::Logger.
Definition at line 429 of file cache.cpp.
References fawkes::Logger::LL_DEBUG.
|
virtual |
Log error message for specific time.
| t | time for this message to log |
| component | component, used to distuinguish logged messages |
| format | format of the message, see man page of sprintf for available tokens. |
| va | variable argument list |
Implements fawkes::Logger.
Definition at line 447 of file cache.cpp.
References fawkes::Logger::LL_ERROR.
|
virtual |
Log informational message for specific time.
| t | time for this message to log |
| component | component, used to distuinguish logged messages |
| format | format of the message, see man page of sprintf for available tokens. |
| va | variable argument list |
Implements fawkes::Logger.
Definition at line 435 of file cache.cpp.
References fawkes::Logger::LL_INFO.
|
virtual |
Log warning message for specific time.
| t | time for this message to log |
| component | component, used to distuinguish logged messages |
| format | format of the message, see man page of sprintf for available tokens. |
| va | variable argument list |
Implements fawkes::Logger.
Definition at line 441 of file cache.cpp.
References fawkes::Logger::LL_WARN.