The Razorback Logging API. More...
#include <syslog.h>
#include <razorback/visibility.h>
#include <razorback/types.h>
Go to the source code of this file.
Enumerations | |
enum | RZB_LOG_DEST_t { RZB_LOG_DEST_FILE, RZB_LOG_DEST_SYSLOG, RZB_LOG_DEST_ERR } |
Log Destinations. More... | |
Functions | |
SO_PUBLIC void | rzb_log (unsigned level, const char *fmt,...) |
Log a message to the system message log. | |
SO_PUBLIC void | rzb_log_remote (uint8_t level, struct EventId *eventId, const char *fmt,...) |
SO_PUBLIC void | rzb_perror (const char *message) |
Log a standard error. | |
SO_PUBLIC int | rzb_get_log_level () |
Get the currently configured log level. | |
SO_PUBLIC RZB_LOG_DEST_t | rzb_get_log_dest () |
Get the currently configured log destination. | |
SO_PUBLIC void | rzb_debug_logging () |
Set logging to debug mode. |
The Razorback Logging API.
Log levels avaliable are the same as the standard syslog log levels and definitions are imported from syslog.
Levels are: LOG_EMERGE LOG_ALERT LOG_CRIT LOG_ERR LOG_WARNING LOG_NOTICE LOG_INFO LOG_DEBUG
enum RZB_LOG_DEST_t |
SO_PUBLIC RZB_LOG_DEST_t rzb_get_log_dest | ( | ) |
Get the currently configured log destination.
SO_PUBLIC int rzb_get_log_level | ( | ) |
Get the currently configured log level.
SO_PUBLIC void rzb_log | ( | unsigned | level, | |
const char * | fmt, | |||
... | ||||
) |
Log a message to the system message log.
level | The message level as defined in syslog.h | |
fmt | The format string for the message | |
... | The data to be formatted. |
SO_PUBLIC void rzb_perror | ( | const char * | message | ) |
Log a standard error.
message | the log message associated with the error. |