Defines | |
| #define | MAX_LOG_STRING 2048 |
| #define | SEV_UNKNOWN_S "Unknown" |
| #define | SEV_ERROR 1 |
| #define | SEV_ERROR_S "Error" |
| #define | SEV_WARNING 2 |
| #define | SEV_WARNING_S "Warning" |
| #define | SEV_INFO 4 |
| #define | SEV_INFO_S "Info" |
| #define | SEV_DEBUG_L1 8 |
| #define | SEV_DEBUG_L1_S "Debug (general)" |
| #define | SEV_DEBUG_L2 16 |
| #define | SEV_DEBUG_L2_S "Debug (stack)" |
| #define | SEV_DEBUG_L3 32 |
| #define | SEV_DEBUG_L3_S "Debug (application)" |
| #define | SEV_DEBUG_L4 64 |
| #define | SEV_DEBUG_L4_S "Debug (low level L4)" |
| #define | SEV_DEBUG_L5 128 |
| #define | SEV_DEBUG_L5_S "Debug (low level L5)" |
| #define | SEV_ALL ( SEV_ERROR | SEV_WARNING | SEV_INFO | SEV_DEBUG_L1 | SEV_DEBUG_L2 | SEV_DEBUG_L3 | SEV_DEBUG_L4 | SEV_DEBUG_L5 ) |
| #define | cg_log_error(format...) cg_log_print(SEV_ERROR, __FILE__, __LINE__, __PRETTY_FUNCTION__, format) |
| #define | cg_log_warning(format...) cg_log_print(SEV_WARNING, __FILE__, __LINE__, __PRETTY_FUNCTION__, format) |
| #define | cg_log_info(format...) cg_log_print(SEV_INFO, __FILE__, __LINE__, __PRETTY_FUNCTION__, format) |
| #define | cg_log_debug(format...) |
| #define | cg_log_debug_l4(format...) |
| #define | cg_log_debug_l5(format...) |
| #define | cg_log_debug_s(format...) |
| #define | cg_log_debug_a(format...) |
Functions | |
| void | cg_log_print (int severity, const char *file, int line_n, const char *function, const char *format,...) |
| void | cg_log_set_separator (char *s) |
| int | cg_log_add_target (char *target, int severity_mask) |
| int | cg_log_clear_targets () |
| #define cg_log_debug | ( | format... | ) |
| #define cg_log_debug_a | ( | format... | ) |
| #define cg_log_debug_l4 | ( | format... | ) |
| #define cg_log_debug_l5 | ( | format... | ) |
| #define cg_log_debug_s | ( | format... | ) |
| #define cg_log_error | ( | format... | ) | cg_log_print(SEV_ERROR, __FILE__, __LINE__, __PRETTY_FUNCTION__, format) |
| #define cg_log_info | ( | format... | ) | cg_log_print(SEV_INFO, __FILE__, __LINE__, __PRETTY_FUNCTION__, format) |
| #define cg_log_warning | ( | format... | ) | cg_log_print(SEV_WARNING, __FILE__, __LINE__, __PRETTY_FUNCTION__, format) |
| #define MAX_LOG_STRING 2048 |
| #define SEV_ALL ( SEV_ERROR | SEV_WARNING | SEV_INFO | SEV_DEBUG_L1 | SEV_DEBUG_L2 | SEV_DEBUG_L3 | SEV_DEBUG_L4 | SEV_DEBUG_L5 ) |
| #define SEV_DEBUG_L1 8 |
| #define SEV_DEBUG_L1_S "Debug (general)" |
| #define SEV_DEBUG_L2 16 |
| #define SEV_DEBUG_L2_S "Debug (stack)" |
| #define SEV_DEBUG_L3 32 |
| #define SEV_DEBUG_L3_S "Debug (application)" |
| #define SEV_DEBUG_L4 64 |
| #define SEV_DEBUG_L4_S "Debug (low level L4)" |
| #define SEV_DEBUG_L5 128 |
| #define SEV_DEBUG_L5_S "Debug (low level L5)" |
| #define SEV_ERROR 1 |
| #define SEV_ERROR_S "Error" |
| #define SEV_INFO 4 |
| #define SEV_INFO_S "Info" |
| #define SEV_UNKNOWN_S "Unknown" |
| #define SEV_WARNING 2 |
| #define SEV_WARNING_S "Warning" |
| int cg_log_add_target | ( | char * | target, | |
| int | mask | |||
| ) |
Add new logging target
| target | String identifying the logging target (Currently stdout|stderr|FILENAME) | |
| mask | Bitmask defining what messages are to be printed into this target |
| int cg_log_clear_targets | ( | ) |
Clear target list
| void cg_log_print | ( | int | severity, | |
| const char * | file, | |||
| int | line_n, | |||
| const char * | function, | |||
| const char * | format, | |||
| ... | ||||
| ) |
Multiplex log messages into different targets (streams), should be used via convenience macros
| severity | Message severity | |
| file | File name where the function is called | |
| line_n | Line number where the function is called | |
| function | Function name where this function is called | |
| format | Format string for the actual log message | |
| ... | Possible parameters for the format string |
| void cg_log_set_separator | ( | char * | s | ) |
Set log item separator
| s | String to use as a log item separator |
1.4.7