25 #include "MCTypes.hpp" 27 #include <boost/algorithm/string/classification.hpp> 40 #define MC_LOG(...) MCLog::LogMessage(__PRETTY_FUNCTION__, __VA_ARGS__) 42 #define MC_WARNING(...) MCLog::WarningMessage(__PRETTY_FUNCTION__, __VA_ARGS__) 44 #define MC_ERROR(...) MCLog::ErrorMessage(__PRETTY_FUNCTION__, __VA_ARGS__) 46 #define MC_BPRINT(color, ...) MCLog::FormattedMessage(color, true, __VA_ARGS__) 48 #define MC_PRINT(color, ...) MCLog::FormattedMessage(color, false, __VA_ARGS__) 50 #define MC_NPRINT(...) MCLog::FormattedMessage(MCLog::NoColor, false, __VA_ARGS__) 96 static bool IsAnyFilterMatched(
const MC::StringList& filters,
const std::string& function_name);
177 static void LogMessage(
const char*
function,
const char* format, ...);
187 static void ErrorMessage(
const char*
function,
const char* format, ...) CLANG_ANALYZER_NORETURN;
197 static
void WarningMessage(const
char* function, const
char* format, ...);
210 #ifndef __AIBO_BUILD__ 255 const char* format, va_list arg_list) = 0;
276 const char* format, va_list arg_list)
override;
279 #ifndef __AIBO_BUILD__ 298 const char* format, va_list arg_list)
override;
static void ErrorMessage(const char *function, const char *format,...) CLANG_ANALYZER_NORETURN
Print error message with red color.
Basic log functionalities.
static QString RemoveMarkup(const QString &orig_str)
Remove the markup.
static QString ConvertFromAnsiToQtMarkup(const QString &orig_str)
Convert the ANSI codes to Qt markup format.
static void SetCustomHandler(MCLogMessageHandler *handler, bool global=false)
Set custom message handler.
static void SetDebugStatus(bool new_status, bool global=false)
Set debug status.
static std::string GetDebugColorFilters()
Get debug color filter.
static void FormattedMessage(MCLog::ColorType color, bool bold, const char *format,...)
Print normal message.
static std::string GetDebugFilter()
Get debug filter.
Simple class to echo the log messages to the console.
static void LogMessage(const char *function, const char *format,...)
Print log message.
Simple class to echo the log messages to the Qt debug console.
static bool GetDebugStatus(bool global=false)
Get debug status.
static void WarningMessage(const char *function, const char *format,...)
Print warning message with yellow color.
static void SetDebugFilter(const std::string &new_filter)
Set debug filter.
static bool IsAnyFilterMatched(const MC::StringList &filters, const std::string &function_name)
Check if any filter matches with the function name.
static void SetDebugColorFilters(const std::string &new_color_filters)
Set debug color filters.