1 #ifndef LOGGING_MACROS_GROUP
2 #define LOGGING_MACROS_GROUP
29 #define update_current_stack_frame_line_number(x)
35 #define FILTER_LOG(the_logger, to_log, filter) { \
36 if (the_logger.member(filter)) { \
37 the_logger.log(to_log, filter); \
42 #define EMERGENCY_LOG(the_logger, to_log) \
43 FILTER_LOG(the_logger, to_log, basis::ALWAYS_PRINT)
46 #define STAMPED_FILTER_LOG(the_logger, to_log, filter) { \
47 if (the_logger.member(filter)) { \
48 astring temp_log = to_log; \
49 if (temp_log.length()) \
50 temp_log.insert(0, timely::time_stamp::notarize(true)); \
51 the_logger.log(temp_log, filter); \
55 #define STAMPED_EMERGENCY_LOG(the_logger, to_log) \
56 STAMPED_FILTER_LOG(the_logger, to_log, basis::ALWAYS_PRINT)
60 #define CLASS_FILTER_LOG(the_logger, to_log, filter) { \
61 update_current_stack_frame_line_number(__LINE__); \
62 if (the_logger.member(filter)) { \
63 astring temp_log = to_log; \
64 if (temp_log.length()) { \
65 temp_log.insert(0, timely::time_stamp::notarize(true)); \
66 BASE_FUNCTION(func); \
68 temp_log += function_name; \
71 the_logger.log(temp_log, filter); \
73 update_current_stack_frame_line_number(__LINE__); \
76 #define CLASS_EMERGENCY_LOG(the_logger, to_log) \
77 CLASS_FILTER_LOG(the_logger, to_log, basis::ALWAYS_PRINT)
82 #define INSTANCE_FILTER_LOG(the_logger, to_log, filter) { \
83 update_current_stack_frame_line_number(__LINE__); \
84 if (the_logger.member(filter)) { \
85 astring temp_log = to_log; \
86 if (temp_log.length()) { \
87 temp_log.insert(0, timely::time_stamp::notarize(true)); \
88 BASE_INSTANCE_FUNCTION(func); \
90 temp_log += function_name; \
93 the_logger.log(temp_log, filter); \
94 update_current_stack_frame_line_number(__LINE__); \
98 #define INSTANCE_EMERGENCY_LOG(the_logger, to_log) \
99 INSTANCE_FILTER_LOG(the_logger, to_log, basis::ALWAYS_PRINT)