![]() |
The ROme OpTimistic Simulator
3.0.0
A General-Purpose Multithreaded Parallel/Distributed Simulation Platform
|
Logging library. More...
#include <stdbool.h>
Go to the source code of this file.
Macros | |
#define | LOG_LEVEL LOG_TRACE |
The minimum logging level supported at compile time. More... | |
#define | LOG_TRACE 0 |
The logging level reserved to very low priority messages. | |
#define | LOG_DEBUG 1 |
The logging level reserved to useful debug messages. | |
#define | LOG_INFO 2 |
The logging level reserved to useful runtime messages. | |
#define | LOG_WARN 3 |
The logging level reserved to unexpected, non deal breaking conditions. | |
#define | LOG_ERROR 4 |
The logging level reserved to unexpected, problematic conditions. | |
#define | LOG_FATAL 5 |
The logging level reserved to unexpected, fatal conditions. | |
#define | log_can_log(lvl) ((lvl) >= LOG_LEVEL && (lvl) >= log_level) |
Checks if a logging level is being processed. More... | |
#define | log_log(lvl, ...) |
Produces a log. More... | |
Functions | |
void | _log_log (int level, const char *file, unsigned line, const char *fmt,...) |
Logs a message. For internal use: log_log() should be used instead. More... | |
void | log_logo_print (void) |
Prints a fancy ROOT-Sim logo on the terminal. | |
Variables | |
int | log_level |
The minimum log level of the messages to display. | |
bool | log_colored |
If set, uses color codes to color the log outputs. | |
Logging library.
This library can be used to produce logs during simulation runs.
Definition in file log.h.
#define LOG_LEVEL LOG_TRACE |
#define log_log | ( | lvl, | |
... | |||
) |
Produces a log.
lvl | the logging level associated to the message |
... | a printf-style format string followed by its arguments if needed |
void _log_log | ( | int | level, |
const char * | file, | ||
unsigned | line, | ||
const char * | fmt, | ||
... | |||
) |
Logs a message. For internal use: log_log() should be used instead.
level | the importance level of the message to log |
file | the file name where this function is being called |
line | the line number where this function is being called |
fmt | a printf-style format string for the message to log |
... | the list of arguments to fill in the format string fmt |