ROOT-Sim core
3.0.0-rc.2
A General-Purpose Multi-threaded Parallel/Distributed Simulation Library
|
Logging library. More...
#include <stdarg.h>
#include <stdio.h>
#include <arch/io.h>
#include <log/log.h>
#include <core/core.h>
Functions | |
void | vlogger (enum log_level level, char *file, unsigned line, const char *fmt,...) |
Logs a message. Don't use this function directly, rely on the logger() macro instead. More... | |
void | log_init (FILE *file) |
Initialize the logging subsystem. More... | |
Variables | |
static FILE * | logfile = NULL |
The file to write logging information to. | |
struct { | |
const char * name | |
const char * color | |
} | levels [] |
The textual representations and the color codes of the logging levels. More... | |
Logging library.
This library can be used to produce logs during simulation runs.
void log_init | ( | FILE * | file | ) |
Initialize the logging subsystem.
file | The FILE to write logging information to. If set to NULL, it is defaulted to stdout. |
void vlogger | ( | enum log_level | level, |
char * | file, | ||
unsigned | line, | ||
const char * | fmt, | ||
... | |||
) |
Logs a message. Don't use this function directly, rely on the logger() macro instead.
level | the importance level of the message to logger |
file | the source file from which the log function was invoked |
line | the line number where this function is being called |
fmt | a printf-style format string for the message to logger |
... | the list of arguments to fill in the format string fmt |
const { ... } levels[] |
The textual representations and the color codes of the logging levels.