Buffered logging (headers) More...
#include <stdio.h>
#include <glib.h>
Go to the source code of this file.
Functions | |
void | janus_vprintf (const char *format,...) G_GNUC_PRINTF(1 |
Buffered vprintf. | |
void int | janus_log_init (gboolean daemon, gboolean console, const char *logfile) |
Log initialization. | |
void | janus_log_set_loggers (GHashTable *loggers) |
Method to add a list of external loggers to the log management. | |
void | janus_log_destroy (void) |
Log destruction. | |
gboolean | janus_log_is_stdout_enabled (void) |
Method to check whether stdout logging is enabled. | |
gboolean | janus_log_is_logfile_enabled (void) |
Method to check whether file-based logging is enabled. | |
char * | janus_log_get_logfile_path (void) |
Method to get the path to the log file. | |
Buffered logging (headers)
Implementation of a simple buffered logger designed to remove I/O wait from threads that may be sensitive to such delays. Buffers are saved and reused to reduce allocation calls. The logger output can then be printed to stdout and/or a log file. If external loggers are added to the core, the logger output is passed to those as well.
void janus_log_destroy | ( | void | ) |
Log destruction.
char * janus_log_get_logfile_path | ( | void | ) |
Method to get the path to the log file.
void int janus_log_init | ( | gboolean | daemon, |
gboolean | console, | ||
const char * | logfile ) |
Log initialization.
daemon | Whether the Janus is running as a daemon or not |
console | Whether the output should be printed on stdout or not |
logfile | Log file to save the output to, if any |
gboolean janus_log_is_logfile_enabled | ( | void | ) |
Method to check whether file-based logging is enabled.
gboolean janus_log_is_stdout_enabled | ( | void | ) |
Method to check whether stdout logging is enabled.
void janus_log_set_loggers | ( | GHashTable * | loggers | ) |
Method to add a list of external loggers to the log management.
loggers | Hash table of external loggers registered in the core |
void janus_vprintf | ( | const char * | format, |
... ) |
Buffered vprintf.
[in] | format | Format string as defined by glib, followed by the optional parameters to insert into formatted string (printf style) |