|
Greenbone Vulnerability Management Libraries 22.32.0
|
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.
Definition in file logging_domain.h.
| typedef struct gvm_logging_domain gvm_logging_domain_t |
Definition at line 15 of file logging_domain.h.
| 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. |
Definition at line 72 of file logging_domain.c.
References gvm_logging_domain::default_level, gvm_logging_domain::log_channel, gvm_logging_domain::log_domain, gvm_logging_domain::log_file, gvm_logging_domain::prepend_separator, gvm_logging_domain::prepend_string, gvm_logging_domain::prepend_time_format, gvm_logging_domain::syslog_facility, and gvm_logging_domain::syslog_ident.
Referenced by Ensure(), Ensure(), Ensure(), and free_log_configuration().

| 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. |
Definition at line 221 of file logging_domain.c.
References gvm_logging_domain::default_level.
Referenced by Ensure(), Ensure(), Ensure(), and gvm_log_func().

| 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. |
Definition at line 356 of file logging_domain.c.
References gvm_logging_domain::log_channel.
Referenced by Ensure(), Ensure(), and gvm_log_func().

| 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. |
Definition at line 102 of file logging_domain.c.
References gvm_logging_domain::log_domain.
Referenced by Ensure(), Ensure(), gvm_log_func(), and setup_log_handlers_internal().

| 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. |
Definition at line 118 of file logging_domain.c.
References gvm_logging_domain::log_file.
Referenced by check_log_file(), Ensure(), Ensure(), Ensure(), and gvm_log_func().

| 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. |
Definition at line 322 of file logging_domain.c.
References gvm_logging_domain::prepend_separator.
Referenced by Ensure(), Ensure(), Ensure(), and gvm_log_func().

| 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. |
Definition at line 152 of file logging_domain.c.
References gvm_logging_domain::prepend_string.
Referenced by Ensure(), Ensure(), Ensure(), and gvm_log_func().

| 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. |
Definition at line 186 of file logging_domain.c.
References gvm_logging_domain::prepend_time_format.
Referenced by Ensure(), Ensure(), Ensure(), and gvm_log_func().

| 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. |
Definition at line 255 of file logging_domain.c.
References gvm_logging_domain::syslog_facility.
Referenced by Ensure(), Ensure(), Ensure(), and gvm_log_func().

| 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. |
Definition at line 289 of file logging_domain.c.
References gvm_logging_domain::syslog_ident.
Referenced by Ensure(), Ensure(), Ensure(), and gvm_log_func().

| 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. |
Definition at line 40 of file logging_domain.c.
References gvm_logging_domain::default_level, gvm_logging_domain::log_channel, gvm_logging_domain::log_domain, gvm_logging_domain::log_file, gvm_logging_domain::prepend_separator, gvm_logging_domain::prepend_string, gvm_logging_domain::prepend_time_format, gvm_logging_domain::syslog_facility, and gvm_logging_domain::syslog_ident.
Referenced by Ensure(), Ensure(), Ensure(), and load_log_configuration().

| 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. |
Definition at line 236 of file logging_domain.c.
References gvm_logging_domain::default_level.
Referenced by Ensure(), and load_log_configuration().

| 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. |
Definition at line 371 of file logging_domain.c.
References gvm_logging_domain::log_channel.
Referenced by Ensure(), and gvm_log_func().

| 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. |
Definition at line 134 of file logging_domain.c.
References gvm_logging_domain::log_file.
Referenced by Ensure(), Ensure(), and load_log_configuration().

| 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. |
Definition at line 338 of file logging_domain.c.
References gvm_logging_domain::prepend_separator.
Referenced by Ensure(), and load_log_configuration().

| 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. |
Definition at line 168 of file logging_domain.c.
References gvm_logging_domain::prepend_string.
Referenced by Ensure(), and load_log_configuration().

| 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. |
Definition at line 203 of file logging_domain.c.
References gvm_logging_domain::prepend_time_format.
Referenced by Ensure(), and load_log_configuration().

| 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. |
Definition at line 271 of file logging_domain.c.
References gvm_logging_domain::syslog_facility.
Referenced by Ensure(), and load_log_configuration().

| 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. |
Definition at line 304 of file logging_domain.c.
References gvm_logging_domain::syslog_ident.
Referenced by Ensure(), and load_log_configuration().
