Go to the documentation of this file.
22 #if KAA_LOG_LEVEL > KAA_LOG_LEVEL_NONE
26 #include <boost/format.hpp>
30 #define PATH_SEPARATOR '\\'
32 #define PATH_SEPARATOR '/'
35 #define __LOGFILE (strrchr(__FILE__, PATH_SEPARATOR) ? strrchr(__FILE__, PATH_SEPARATOR) + 1 : __FILE__)
41 #if KAA_LOG_LEVEL > KAA_LOG_LEVEL_NONE
42 void kaa_log_message(
const ILogger & logger,
LogLevel level,
const char *message,
const char *file,
size_t lineno);
43 void kaa_log_message(
const ILogger & logger,
LogLevel level,
const std::string &message,
const char *file,
size_t lineno);
44 void kaa_log_message(
const ILogger & logger,
LogLevel level,
const boost::format& message,
const char *file,
size_t lineno);
48 #if KAA_LOG_LEVEL >= KAA_LOG_LEVEL_FINE_TRACE
49 #define KAA_LOG_FTRACE(message) kaa_log_message(context_.getLogger(), LogLevel::KAA_TRACE, (message), __LOGFILE, __LINE__);
51 #define KAA_LOG_FTRACE(message)
53 #if KAA_LOG_LEVEL >= KAA_LOG_LEVEL_TRACE
54 #define KAA_LOG_TRACE(message) kaa_log_message(context_.getLogger(), LogLevel::KAA_TRACE, (message), __LOGFILE, __LINE__);
56 #define KAA_LOG_TRACE(message)
58 #if KAA_LOG_LEVEL >= KAA_LOG_LEVEL_DEBUG
59 #define KAA_LOG_DEBUG(message) kaa_log_message(context_.getLogger(), LogLevel::KAA_DEBUG, (message), __LOGFILE, __LINE__);
61 #define KAA_LOG_DEBUG(message)
63 #if KAA_LOG_LEVEL >= KAA_LOG_LEVEL_INFO
64 #define KAA_LOG_INFO(message) kaa_log_message(context_.getLogger(), LogLevel::KAA_INFO, (message), __LOGFILE, __LINE__);
66 #define KAA_LOG_INFO(message)
68 #if KAA_LOG_LEVEL >= KAA_LOG_LEVEL_WARNING
69 #define KAA_LOG_WARN(message) kaa_log_message(context_.getLogger(), LogLevel::KAA_WARNING, (message), __LOGFILE, __LINE__);
71 #define KAA_LOG_WARN(message)
73 #if KAA_LOG_LEVEL >= KAA_LOG_LEVEL_ERROR
74 #define KAA_LOG_ERROR(message) kaa_log_message(context_.getLogger(), LogLevel::KAA_ERROR, (message), __LOGFILE, __LINE__);
76 #define KAA_LOG_ERROR(message)
78 #if KAA_LOG_LEVEL >= KAA_LOG_LEVEL_FATAL
79 #define KAA_LOG_FATAL(message) kaa_log_message(context_.getLogger(), LogLevel::KAA_FATAL, (message), __LOGFILE, __LINE__);
81 #define KAA_LOG_FATAL(message)
84 #if defined(KAA_THREADSAFE) && defined(KAA_MUTEX_LOGGING_ENABLED) && KAA_LOG_LEVEL > 4
85 #define KAA_MUTEX_LOCKING(mutex_name) KAA_LOG_DEBUG("Locking " mutex_name " mutex");
86 #define KAA_MUTEX_LOCKED(mutex_name) KAA_LOG_DEBUG("Locked " mutex_name " mutex");
87 #define KAA_MUTEX_UNLOCKING(mutex_name) KAA_LOG_DEBUG("Unlocking " mutex_name " mutex");
88 #define KAA_MUTEX_UNLOCKED(mutex_name) KAA_LOG_DEBUG("Unlocked " mutex_name " mutex");
90 #define KAA_MUTEX_LOCKING(mutex_name)
91 #define KAA_MUTEX_LOCKED(mutex_name)
92 #define KAA_MUTEX_UNLOCKING(mutex_name)
93 #define KAA_MUTEX_UNLOCKED(mutex_name)