![]() |
Tesseroids 1.0: User Manual and API Documentation |
Functions to set up logging. More...
#include <stdio.h>
#include <stdarg.h>
#include <time.h>
#include "logger.h"
Functions | |
void | log_init (int level) |
Setup logging to stderr. | |
void | log_tofile (FILE *logfile, int level) |
Set logging to a file. | |
void | log_debug (const char *fmt,...) |
Log a message at debug level. | |
void | log_info (const char *fmt,...) |
Log a message at info level. | |
void | log_warning (const char *fmt,...) |
Log a message at warning level. | |
void | log_error (const char *fmt,...) |
Log a message at error level. | |
Variables | |
LOGGER | logger |
Global logger struct. |
Functions to set up logging.
void log_debug | ( | const char * | fmt, | |
... | ||||
) |
Log a message at debug level.
Pass parameters in the same format as printf()
Prints a newline at the end.
void log_error | ( | const char * | fmt, | |
... | ||||
) |
Log a message at error level.
Pass parameters in the same format as printf()
Prints a newline at the end.
void log_info | ( | const char * | fmt, | |
... | ||||
) |
Log a message at info level.
Pass parameters in the same format as printf()
Does not print "INFO: " in front of the message when logging
Prints a newline at the end.
void log_init | ( | int | level | ) |
Setup logging to stderr.
level | level of logging to be made. Can be one of:
|
void log_tofile | ( | FILE * | logfile, | |
int | level | |||
) |
Set logging to a file.
logfile | FILE pointer to the already open file to log to. | |
level | level of logging to be made to the file. Can be one of:
|
void log_warning | ( | const char * | fmt, | |
... | ||||
) |
Log a message at warning level.
Pass parameters in the same format as printf()
Prints a newline at the end.