Greenbone Vulnerability Management Libraries 22.18.1
|
Implementation of logging domain handling. More...
#include <glib.h>
Go to the source code of this file.
Typedefs | |
typedef struct gvm_logging_domain | gvm_logging_domain_t |
Functions | |
gvm_logging_domain_t * | gvm_logging_domain_new (gchar *log_domain) |
Function to initialize logging instance. | |
void | gvm_logging_domain_free (gvm_logging_domain_t *log_domain) |
Frees the resources associated with the given logging domain. | |
gchar * | gvm_logging_domain_get_log_domain (gvm_logging_domain_t *log_domain) |
gchar * | gvm_logging_domain_get_log_file (gvm_logging_domain_t *log_domain) |
void | gvm_logging_domain_set_log_file (gvm_logging_domain_t *log_domain, gchar *log_file) |
Sets the log file for the logging domain. | |
gchar * | gvm_logging_domain_get_prepend_string (gvm_logging_domain_t *log_domain) |
void | gvm_logging_domain_set_prepend_string (gvm_logging_domain_t *log_domain, gchar *prepend_string) |
Sets the preprend string for the logging domain. | |
gchar * | gvm_logging_domain_get_prepend_time_format (gvm_logging_domain_t *log_domain) |
void | gvm_logging_domain_set_prepend_time_format (gvm_logging_domain_t *log_domain, gchar *prepend_time_format) |
Sets the prepend time format for the logging domain. | |
GLogLevelFlags * | gvm_logging_domain_get_default_level (gvm_logging_domain_t *log_domain) |
void | gvm_logging_domain_set_default_level (gvm_logging_domain_t *log_domain, GLogLevelFlags default_level) |
Sets the default log level for the logging domain. | |
gchar * | gvm_logging_domain_get_syslog_facility (gvm_logging_domain_t *log_domain) |
void | gvm_logging_domain_set_syslog_facility (gvm_logging_domain_t *log_domain, gchar *syslog_facility) |
Sets the syslog facility for the logging domain. | |
gchar * | gvm_logging_domain_get_syslog_ident (gvm_logging_domain_t *log_domain) |
void | gvm_logging_domain_set_syslog_ident (gvm_logging_domain_t *log_domain, gchar *syslog_ident) |
Sets the syslog ident for the logging domain. | |
gchar * | gvm_logging_domain_get_prepend_separator (gvm_logging_domain_t *log_domain) |
void | gvm_logging_domain_set_prepend_separator (gvm_logging_domain_t *log_domain, gchar *prepend_separator) |
Sets the prepend separator for the logging domain. | |
GIOChannel * | gvm_logging_domain_get_log_channel (gvm_logging_domain_t *log_domain) |
void | gvm_logging_domain_set_log_channel (gvm_logging_domain_t *log_domain, GIOChannel *log_channel) |
Sets the log channel for the logging domain. | |
Implementation of logging domain handling.
typedef struct gvm_logging_domain gvm_logging_domain_t |
void gvm_logging_domain_free | ( | gvm_logging_domain_t * | log_domain | ) |
Frees the resources associated with the given logging domain.
Frees the resources associated with the given logging domain. This function should be called when the logging domain is no longer needed to ensure that all allocated resources are properly released.
log_domain | A pointer to a gvm_logging_t structure representing the logging domain to be freed. |
GLogLevelFlags * gvm_logging_domain_get_default_level | ( | gvm_logging_domain_t * | log_domain | ) |
Retrieves the default log level associated with the given logging domain.
The returned default log level is still owned by the logging domain and should not be freed by the caller.
log_domain | A pointer to a gvm_logging_domain_t structure. |
GIOChannel * gvm_logging_domain_get_log_channel | ( | gvm_logging_domain_t * | log_domain | ) |
Retrieves the log channel associated with the given logging domain.
The returned log channel is still owned by the logging domain and should not be freed by the caller.
log_domain | A pointer to a gvm_logging_domain_t structure. |
gchar * gvm_logging_domain_get_log_domain | ( | gvm_logging_domain_t * | log_domain | ) |
Retrieves the log domain associated with the given logging domain.
The returned log domain is still owned by the logging domain and should not be freed by the caller.
log_domain | A pointer to a gvm_logging_domain_t structure. |
gchar * gvm_logging_domain_get_log_file | ( | gvm_logging_domain_t * | log_domain | ) |
Retrieves the log file associated with the given logging domain.
The returned log file is still owned by the logging domain and should not be freed by the caller.
log_domain | A pointer to a gvm_logging_domain_t structure. |
gchar * gvm_logging_domain_get_prepend_separator | ( | gvm_logging_domain_t * | log_domain | ) |
Retrieves the prepend separator associated with the given logging domain.
The returned prepend separator is still owned by the logging domain and should not be freed by the caller.
log_domain | A pointer to a gvm_logging_domain_t structure. |
gchar * gvm_logging_domain_get_prepend_string | ( | gvm_logging_domain_t * | log_domain | ) |
Retrieves the prepend string associated with the given logging domain.
The returned prepend string is still owned by the logging domain and should not be freed by the caller.
log_domain | A pointer to a gvm_logging_domain_t structure. |
gchar * gvm_logging_domain_get_prepend_time_format | ( | gvm_logging_domain_t * | log_domain | ) |
Retrieves the prepend time format associated with the given logging domain.
The returned prepend time format is still owned by the logging domain and should not be freed by the caller.
log_domain | A pointer to a gvm_logging_domain_t structure. |
gchar * gvm_logging_domain_get_syslog_facility | ( | gvm_logging_domain_t * | log_domain | ) |
Retrieves the syslog facility associated with the given logging domain.
The returned syslog facility is still owned by the logging domain and should not be freed by the caller.
log_domain | A pointer to a gvm_logging_domain_t structure. |
gchar * gvm_logging_domain_get_syslog_ident | ( | gvm_logging_domain_t * | log_domain | ) |
Retrieves the syslog ident associated with the given logging domain.
The returned syslog ident is still owned by the logging domain and should not be freed by the caller.
log_domain | A pointer to a gvm_logging_domain_t structure. |
gvm_logging_domain_t * gvm_logging_domain_new | ( | gchar * | log_domain | ) |
Function to initialize logging instance.
This function is responsible for setting up the logging mechanism and returning a pointer to the logging struct. It ensures that the logging struct is properly configured before use.
log_domain | A string containing the log domain to be used. Gets owned by the logging domain and must not be freed. |
void gvm_logging_domain_set_default_level | ( | gvm_logging_domain_t * | log_domain, |
GLogLevelFlags | default_level ) |
Sets the default log level for the logging domain.
This function sets the default log level for the specified logging domain.
log_domain | The logging domain for which the default log level is to be set. |
default_level | The default log level to set. |
void gvm_logging_domain_set_log_channel | ( | gvm_logging_domain_t * | log_domain, |
GIOChannel * | log_channel ) |
Sets the log channel for the logging domain.
This function sets the log channel for the specified logging domain.
log_domain | The logging domain for which the log channel is to be set. |
log_channel | The log channel to set. Gets referenced by the logging and unreferenced when the logging domain is freed. |
void gvm_logging_domain_set_log_file | ( | gvm_logging_domain_t * | log_domain, |
gchar * | log_file ) |
Sets the log file for the logging domain.
This function sets the file to which log messages for the specified logging domain will be written.
log_domain | The logging domain for which the log file is to be set. |
log_file | The path to the log file. Gets owned by the logging domain and must not be freed. |
void gvm_logging_domain_set_prepend_separator | ( | gvm_logging_domain_t * | log_domain, |
gchar * | prepend_separator ) |
Sets the prepend separator for the logging domain.
This function sets the prepend separator for the specified logging domain.
log_domain | The logging domain for which the prepend separator is to be set. |
prepend_separator | The prepend separator to set. Gets owned by the logging domain and must not be freed. |
void gvm_logging_domain_set_prepend_string | ( | gvm_logging_domain_t * | log_domain, |
gchar * | prepend_string ) |
Sets the preprend string for the logging domain.
This function sets the string that will be prepended to every log message
log_domain | The logging domain for which the prepend string is to be set. |
prepend_string | The string to prepend. Gets owned by the logging domain and must not be freed. |
void gvm_logging_domain_set_prepend_time_format | ( | gvm_logging_domain_t * | log_domain, |
gchar * | prepend_time_format ) |
Sets the prepend time format for the logging domain.
This function sets the time format that will be used when t is present in the prepend string.
log_domain | The logging domain for which the prepend time format is to be set. |
prepend_time_format | The time format to set. Gets owned by the logging domain and must not be freed. |
void gvm_logging_domain_set_syslog_facility | ( | gvm_logging_domain_t * | log_domain, |
gchar * | syslog_facility ) |
Sets the syslog facility for the logging domain.
This function sets the syslog facility for the specified logging domain.
log_domain | The logging domain for which the syslog facility is to be set. |
syslog_facility | The syslog facility to set. Gets owned by the logging domain and must not be freed. |
void gvm_logging_domain_set_syslog_ident | ( | gvm_logging_domain_t * | log_domain, |
gchar * | syslog_ident ) |
Sets the syslog ident for the logging domain.
This function sets the syslog ident for the specified logging domain.
log_domain | The logging domain for which the syslog ident is to be set. |
syslog_ident | The syslog ident to set. Gets owned by the logging domain and must not be freed. |