libcontrac
A library for contact tracing
|
Allows output to be sent to the log. More...
Files | |
file | log.h |
Allows output to be sent to the log. | |
Macros | |
#define | LOG(level, ...) log_priority(level, __VA_ARGS__); |
Functions | |
void | log_priority (int priority, const char *format,...) |
Allows output to be sent to the log.
This is a simple set of functions and macros that allows strings to be recorded in the syslog.
#define LOG | ( | level, | |
... | |||
) | log_priority(level, __VA_ARGS__); |
Log a string to syslog.
Constructs a message using the supplied format and parameters and records it in the system log. The format is the same as for printf.
The logging levels are the standard syslog levels:
LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERR, etc.
priority | The log level priority. |
format | The format for the message, the same as for printf. |
... | parameters to combine with the format to create the message. |
void log_priority | ( | int | priority, |
const char * | format, | ||
... | |||
) |
Log a string to syslog.
In generl, the LOG macro should be used instead.
Constructs a message using the supplied format and parameters and records it in the system log. The format is the same as for printf.
The logging levels are the standard syslog levels:
LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERR, etc.
priority | The log level priority. |
format | The format for the message, the same as for printf. |
... | parameters to combine with the format to create the message. |