 |
The ROme OpTimistic Simulator
3.0.0
A General-Purpose Multithreaded Parallel/Distributed Simulation Platform
|
Go to the documentation of this file.
28 [
LOG_TRACE] = {.name =
"TRACE", .color =
"\x1b[94m"},
29 [
LOG_DEBUG] = {.name =
"DEBUG", .color =
"\x1b[36m"},
30 [
LOG_INFO] = {.name =
"INFO", .color =
"\x1b[32m"},
31 [
LOG_WARN] = {.name =
"WARN", .color =
"\x1b[33m"},
32 [
LOG_ERROR] = {.name =
"ERROR", .color =
"\x1b[31m"},
33 [
LOG_FATAL] = {.name =
"FATAL", .color =
"\x1b[35m"}
44 void _log_log(
int level,
const char *file,
unsigned line,
const char *fmt, ...)
48 char time_string[IO_TIME_BUFFER_LEN];
49 io_local_time_get(time_string);
54 "%s %s%-5s\x1b[0m \x1b[90m%s:%u:\x1b[0m ",
73 vfprintf(stderr, fmt, args);
75 fprintf(stderr,
"\n");
85 fprintf(stderr,
"\x1b[94m __ \x1b[90m __ _______ \x1b[94m _ \x1b[90m \n");
86 fprintf(stderr,
"\x1b[94m /__)\x1b[90m/ ) / ) / __ \x1b[94m ( `\x1b[90m . ___ \n");
87 fprintf(stderr,
"\x1b[94m / \\ \x1b[90m(__/ (__/ ( \x1b[94m._)\x1b[90m / / / )\n");
88 fprintf(stderr,
"\x1b[0m\n");
90 fprintf(stderr,
" __ __ _______ _ \n");
91 fprintf(stderr,
" /__) / ) / ) / __ ( ` . ___ \n");
92 fprintf(stderr,
"/ \\ (__/ (__/ ( ._) / / / )\n");
93 fprintf(stderr,
"\n");
#define LOG_DEBUG
The logging level reserved to useful debug messages.
int log_level
The minimum log level of the messages to display.
#define LOG_ERROR
The logging level reserved to unexpected, problematic conditions.
#define LOG_LEVEL
The minimum logging level supported at compile time.
#define LOG_TRACE
The logging level reserved to very low priority messages.
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.
void log_logo_print(void)
Prints a fancy ROOT-Sim logo on the terminal.
bool log_colored
If set, uses color codes to color the log outputs.
#define LOG_FATAL
The logging level reserved to unexpected, fatal conditions.
#define LOG_INFO
The logging level reserved to useful runtime messages.
static const struct @3 levels[]
The textual representations and the color codes of the logging levels.
#define LOG_WARN
The logging level reserved to unexpected, non deal breaking conditions.
Generic input-output facilities.