18 #define RESET "\033[0m"
19 #define BLACK "\033[30m"
20 #define RED "\033[31m"
21 #define GREEN "\033[32m"
22 #define YELLOW "\033[33m"
23 #define BLUE "\033[34m"
24 #define MAGENTA "\033[35m"
25 #define CYAN "\033[36m"
26 #define WHITE "\033[37m"
27 #define DK_GREY "\033[90m"
28 #define LT_GREY "\033[37m"
29 #define LT_RED "\033[91m"
30 #define LT_GREEN "\033[92m"
31 #define LT_YELLOW "\033[93m"
32 #define LT_BLUE "\033[94m"
33 #define LT_MAGENTA "\033[95m"
34 #define LT_CYAN "\033[96m"
37 #define BOLD "\033[1m"
39 #define UNDERLINE "\033[4m"
45 #define RESET_LOG_SETTINGS \
46 std::cout << RESET << std::endl;
48 #define LOG_GENERAL(color, message, variable)\
49 std::cout << color << message << variable; \
52 #define LOG_DEBUG(variable)\
53 std::cout << BOLD << YELLOW << #variable << " : " << LT_YELLOW << variable; \
56 #define LOG_INFO(variable)\
57 std::cout << BOLD << GREEN << #variable << " : " << LT_GREEN << variable; \
60 #define LOG_WARNING(variable)\
61 std::cout << BOLD << RED << #variable << " : " << LT_RED << variable; \
64 #define LOG_DEBUG_HEADER(header, variable)\
65 std::cout << BOLD << UNDERLINE << YELLOW << #header; \
67 std::cout << BOLD << YELLOW << #variable << " : " << LT_YELLOW << variable\
70 #define LOG_INFO_HEADER(header, variable)\
71 std::cout << BOLD << UNDERLINE << GREEN << #header; \
73 std::cout << BOLD << GREEN << #variable << " : " << LT_GREEN << variable\
76 #define LOG_WARNING_HEADER(header, variable)\
77 std::cout << BOLD << UNDERLINE << RED << #header; \
79 std::cout << BOLD << RED << #variable << " : " << LT_RED << variable\
86 #define DEBUG_MSG( message )\
87 std::cout << BOLD << GREEN << UNDERLINE << "DEBUG" << RESET << std::endl;\
88 std::cout << BOLD << GREEN << message << std::endl;\
91 #define INFO_MSG( message )\
92 std::cout << BOLD << DK_GREY << UNDERLINE << "INFO : " << RESET << std::endl;\
93 std::cout << BOLD << DK_GREY << message << std::endl;\
96 #define WARNING_MSG( message )\
97 std::cout << BOLD << YELLOW << UNDERLINE << "WARNING" << RESET << std::endl;\
98 std::cout << BOLD << YELLOW << message << std::endl;\
101 #define ERROR_MSG( message, function )\
102 std::cout << BOLD << RED << UNDERLINE << "ERROR from " << function << RESET << std::endl;\
103 std::cout << BOLD << RED << message << std::endl;\
114 #define TENSOR_LOG_SETTINGS \
116 std::cout.precision(2);\
121 #define LOG_MATRIX_PRETTY( matrix )\
122 TENSOR_LOG_SETTINGS \
123 std::cout << #matrix << " : [ " << matrix.size1() << " x " << matrix.size2() << " ] :" << std::endl;\
124 for ( unsigned int i = 0; i < matrix.size1( ); ++i )\
126 for ( unsigned int j = 0; j < matrix.size2( ); ++j )\
127 std::cout << std::scientific << matrix(i,j) << "\t";\
128 std::cout << std::endl;\
132 #define LOG_VECTOR_PRETTY( vector )\
133 TENSOR_LOG_SETTINGS \
134 std::cout << #vector << " : " << std::scientific << vector;\
137 #define LOG_VECTOR3( array )\
138 TENSOR_LOG_SETTINGS \
139 std::cout << #array << " : " << std::scientific << array[0] << ", " << std::scientific << array[1] << ", " << std::scientific << array[2];\
142 #define LOG_VECTOR2( array )\
143 TENSOR_LOG_SETTINGS \
144 std::cout << #array << " : " << std::scientific << array[0] << ", " << std::scientific << array[1];\
147 #define LOG_SCALAR( scalar )\
148 TENSOR_LOG_SETTINGS \
149 std::cout << #scalar << " : " << std::scientific << scalar;\
160 #define CONDITION_LOG_SETTINGS \
161 std::cout << BLUE << "Condition : " << std::endl; \
162 std::cout << LT_BLUE;\
167 #define LOG_CONDITION_HEADER( master, slave ) \
168 CONDITION_LOG_SETTINGS \
169 std::cout << "|_ Master : "; \
170 for( unsigned int i = 0; i < master.PointsNumber( ) - 1; ++i ) \
171 std::cout << master[i].Id( ) << ", "; \
172 std::cout << master[master.PointsNumber( ) - 1].Id( ) << "\n";\
173 std::cout << "|_ Slave : "; \
174 for( unsigned int i = 0; i < master.PointsNumber( ) - 1; ++i ) \
175 std::cout << slave[i].Id( ) << ", "; \
176 std::cout << slave[slave.PointsNumber( ) - 1].Id( ) << "\n";\
LoggingLevel
Definition: logging_settings.hpp:42
@ info_warnings
Definition: logging_settings.hpp:42
@ system_matrices
Definition: logging_settings.hpp:42
@ debug
Definition: logging_settings.hpp:42
@ none
Definition: logging_settings.hpp:42