/** ******************************************************************************* * @file etk/Debug.h * @brief Ewol Tool Kit : log implementation * @author Edouard DUPIN * @date 08/06/2010 * @par Project * Ewol TK * * @par Copyright * Copyright 2011 Edouard DUPIN, all right reserved * * This software is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY. * * Licence summary : * You can modify and redistribute the sources code and binaries. * You can send me the bug-fix * * Term of the licence in in the file licence.txt. * ******************************************************************************* */ #ifndef __ETK_DEBUG_H__ #define __ETK_DEBUG_H__ #include #include // Log Message System For EDN void TOOLS_DisplayFuncName(int32_t ligne, const char* className, const char* funcName, const char* libName); void TOOLS_DisplayTime(void); //regular colors #define ETK_BASH_COLOR_BLACK "\e[0;30m" #define ETK_BASH_COLOR_RED "\e[0;31m" #define ETK_BASH_COLOR_GREEN "\e[0;32m" #define ETK_BASH_COLOR_YELLOW "\e[0;33m" #define ETK_BASH_COLOR_BLUE "\e[0;34m" #define ETK_BASH_COLOR_MAGENTA "\e[0;35m" #define ETK_BASH_COLOR_CYAN "\e[0;36m" #define ETK_BASH_COLOR_WHITE "\e[0;37m" //emphasized (bolded) colors #define ETK_BASH_COLOR_BOLD_BLACK "\e[1;30m" #define ETK_BASH_COLOR_BOLD_RED "\e[1;31m" #define ETK_BASH_COLOR_BOLD_GREEN "\e[1;32m" #define ETK_BASH_COLOR_BOLD_YELLOW "\e[1;33m" #define ETK_BASH_COLOR_BOLD_BLUE "\e[1;34m" #define ETK_BASH_COLOR_BOLD_MAGENTA "\e[1;35m" #define ETK_BASH_COLOR_BOLD_CYAN "\e[1;36m" #define ETK_BASH_COLOR_BOLD_WHITE "\e[1;37m" //background colors #define ETK_BASH_COLOR_BG_BLACK "\e[40m" #define ETK_BASH_COLOR_BG_RED "\e[41m" #define ETK_BASH_COLOR_BG_GREEN "\e[42m" #define ETK_BASH_COLOR_BG_YELLOW "\e[43m" #define ETK_BASH_COLOR_BG_BLUE "\e[44m" #define ETK_BASH_COLOR_BG_MAGENTA "\e[45m" #define ETK_BASH_COLOR_BG_CYAN "\e[46m" #define ETK_BASH_COLOR_BG_WHITE "\e[47m" // Return to the normal color setings #define ETK_BASH_COLOR_NORMAL "\e[0m" //go to the Top of bash #define ETK_BASH_GO_TOP "\e[0;0f" #undef __class__ #define __class__ (NULL) #define ETK_DBG_COMMON(libName, color, info, data) do { \ etk::cout << color; \ TOOLS_DisplayTime(); \ TOOLS_DisplayFuncName(__LINE__, __class__, __func__, libName); \ etk::cout << "[" << info << "] " << data; \ etk::cout << ETK_BASH_COLOR_NORMAL <