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, GHashTable *loggers) |
Log initialization. | |
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. Each time there's stuff to be written (to stdout, log files, or external loggers), it's added to an async queue, which is consumed from a dedicated thread that then actually takes care of I/O.
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, | ||
GHashTable * | loggers ) |
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 |
loggers | Hash table of external loggers registered in the core, 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_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) |