|
Greenbone Vulnerability Management Libraries
10.0.0
|
Implementation of logging methods. More...
#include <glib.h>

Go to the source code of this file.
Functions | |
| GSList * | load_log_configuration (gchar *) |
| Loads parameters from a config file into a linked list. More... | |
| void | free_log_configuration (GSList *) |
| Frees all resources loaded by the config loader. More... | |
| gchar * | get_time (gchar *) |
| Returns time as specified in time_fmt strftime format. More... | |
| void | gvm_log_silent (const char *, GLogLevelFlags, const char *, gpointer) |
| Returns immediately. More... | |
| void | gvm_log_func (const char *, GLogLevelFlags, const char *, gpointer) |
| Creates the formatted string and outputs it to the log destination. More... | |
| void | log_func_for_gnutls (int, const char *) |
| This function logs debug messages from gnutls. More... | |
| void | setup_log_handlers (GSList *) |
| Sets up routing of logdomains to log handlers. More... | |
Implementation of logging methods.
Definition in file logging.h.
| void free_log_configuration | ( | GSList * | log_domain_list | ) |
Frees all resources loaded by the config loader.
| log_domain_list | Head of the link list. |
Definition at line 283 of file logging.c.
References gvm_logging_t::default_level, gvm_logging_t::log_channel, gvm_logging_t::log_domain, gvm_logging_t::log_file, gvm_logging_t::prepend_separator, gvm_logging_t::prepend_string, gvm_logging_t::prepend_time_format, and gvm_logging_t::syslog_ident.
| gchar* get_time | ( | gchar * | time_fmt | ) |
Returns time as specified in time_fmt strftime format.
| time_fmt | ptr to the string format to use. The strftime man page documents the conversion specification. An example time_fmt string is "%Y-%m-%d %H:%M:%S". |
Definition at line 74 of file logging.c.
Referenced by gvm_log_func().

| void gvm_log_func | ( | const char * | log_domain, |
| GLogLevelFlags | log_level, | ||
| const char * | message, | ||
| gpointer | gvm_log_config_list | ||
| ) |
Creates the formatted string and outputs it to the log destination.
| log_domain | A string containing the message's log domain. |
| log_level | Flags defining the message's log level. |
| message | A string containing the log message. |
| gvm_log_config_list | A pointer to the configuration linked list. |
Definition at line 384 of file logging.c.
References gvm_logging_t::default_level, facility_int_from_string(), get_time(), gvm_log_lock(), gvm_log_lock_init(), gvm_log_unlock(), gvm_logging_t::log_channel, gvm_logging_t::log_domain, gvm_logging_t::log_file, gvm_logging_t::prepend_separator, gvm_logging_t::prepend_string, gvm_logging_t::prepend_time_format, gvm_logging_t::syslog_facility, and gvm_logging_t::syslog_ident.
Referenced by setup_log_handlers().


| void gvm_log_silent | ( | const char * | log_domain, |
| GLogLevelFlags | log_level, | ||
| const char * | message, | ||
| gpointer | gvm_log_config_list | ||
| ) |
Returns immediately.
| log_domain | A string containing the message's log domain. |
| log_level | Flags defining the message's log level. |
| message | A string containing the log message. |
| gvm_log_config_list | A pointer to the configuration linked list. |
| GSList* load_log_configuration | ( | gchar * | config_file | ) |
Loads parameters from a config file into a linked list.
| config_file | A string containing the path to the configuration file to load. |
Definition at line 155 of file logging.c.
References gvm_logging_t::default_level, level_int_from_string(), gvm_logging_t::log_channel, gvm_logging_t::log_domain, gvm_logging_t::log_file, gvm_logging_t::prepend_separator, gvm_logging_t::prepend_string, gvm_logging_t::prepend_time_format, gvm_logging_t::syslog_facility, and gvm_logging_t::syslog_ident.

| void log_func_for_gnutls | ( | int | level, |
| const char * | message | ||
| ) |
This function logs debug messages from gnutls.
| level | GnuTLS log level (integer from 0 to 99 according to GnuTLS documentation. |
| message | GnuTLS log message. |
To enable GNUTLS debug messages, the environment variable OPENVAS_GNUTLS_DEBUG is to be set to the desired log level as described in the GNUTLS manual.
| void setup_log_handlers | ( | GSList * | gvm_log_config_list | ) |
Sets up routing of logdomains to log handlers.
Iterates over the link list and adds the groups to the handler.
| gvm_log_config_list | A pointer to the configuration linked list. |
Definition at line 751 of file logging.c.
References gvm_log_func(), and gvm_logging_t::log_domain.
