1 #ifndef LOGGING_MACROS_GROUP
2 #define LOGGING_MACROS_GROUP
36 #define FILTER_LOG(the_logger, to_log, filter) { \
37 if (the_logger.member(filter)) { \
38 the_logger.log(to_log, filter); \
43 #define EMERGENCY_LOG(the_logger, to_log) \
44 FILTER_LOG(the_logger, to_log, basis::ALWAYS_PRINT)
47 #define STAMPED_FILTER_LOG(the_logger, to_log, filter) { \
48 if (the_logger.member(filter)) { \
49 astring temp_log = to_log; \
50 if (temp_log.length()) \
51 temp_log.insert(0, timely::time_stamp::notarize(true)); \
52 the_logger.log(temp_log, filter); \
56 #define STAMPED_EMERGENCY_LOG(the_logger, to_log) \
57 STAMPED_FILTER_LOG(the_logger, to_log, basis::ALWAYS_PRINT)
61 #define CLASS_FILTER_LOG(the_logger, to_log, filter) { \
62 application::update_current_stack_frame_line_number(__LINE__); \
63 if (the_logger.member(filter)) { \
64 astring temp_log = to_log; \
65 if (temp_log.length()) { \
66 temp_log.insert(0, timely::time_stamp::notarize(true)); \
67 BASE_FUNCTION(func); \
69 temp_log += function_name; \
72 the_logger.log(temp_log, filter); \
74 application::update_current_stack_frame_line_number(__LINE__); \
77 #define CLASS_EMERGENCY_LOG(the_logger, to_log) \
78 CLASS_FILTER_LOG(the_logger, to_log, basis::ALWAYS_PRINT)
83 #define INSTANCE_FILTER_LOG(the_logger, to_log, filter) { \
84 application::update_current_stack_frame_line_number(__LINE__); \
85 if (the_logger.member(filter)) { \
86 astring temp_log = to_log; \
87 if (temp_log.length()) { \
88 temp_log.insert(0, timely::time_stamp::notarize(true)); \
89 BASE_INSTANCE_FUNCTION(func); \
91 temp_log += function_name; \
94 the_logger.log(temp_log, filter); \
95 application::update_current_stack_frame_line_number(__LINE__); \
99 #define INSTANCE_EMERGENCY_LOG(the_logger, to_log) \
100 INSTANCE_FILTER_LOG(the_logger, to_log, basis::ALWAYS_PRINT)