logging_domain.h
Go to the documentation of this file.
/* SPDX-FileCopyrightText: 2025 Greenbone AG
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef _GVM_BASE_LOGGING_DOMAIN_H
#define _GVM_BASE_LOGGING_DOMAIN_H
#include <glib.h>
typedef struct gvm_logging_domain gvm_logging_domain_t;
gvm_logging_domain_t *
gvm_logging_domain_new (gchar *log_domain);
void
gvm_logging_domain_free (gvm_logging_domain_t *log_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);
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);
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);
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);
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);
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);
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);
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);
#endif /* not _GVM_BASE_LOGGING_DOMAIN_H */
gvm_logging_domain_t
struct gvm_logging_domain gvm_logging_domain_t
Definition logging_domain.h:15
gvm_logging_domain_set_prepend_separator
void gvm_logging_domain_set_prepend_separator(gvm_logging_domain_t *log_domain, gchar *prepend_separator)
Sets the prepend separator for the logging domain.
Definition logging_domain.c:341
gvm_logging_domain_get_log_channel
GIOChannel * gvm_logging_domain_get_log_channel(gvm_logging_domain_t *log_domain)
Definition logging_domain.c:359
gvm_logging_domain_set_log_file
void gvm_logging_domain_set_log_file(gvm_logging_domain_t *log_domain, gchar *log_file)
Sets the log file for the logging domain.
Definition logging_domain.c:137
gvm_logging_domain_set_syslog_ident
void gvm_logging_domain_set_syslog_ident(gvm_logging_domain_t *log_domain, gchar *syslog_ident)
Sets the syslog ident for the logging domain.
Definition logging_domain.c:307
gvm_logging_domain_set_prepend_time_format
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.
Definition logging_domain.c:206
gvm_logging_domain_set_syslog_facility
void gvm_logging_domain_set_syslog_facility(gvm_logging_domain_t *log_domain, gchar *syslog_facility)
Sets the syslog facility for the logging domain.
Definition logging_domain.c:274
gvm_logging_domain_get_default_level
GLogLevelFlags * gvm_logging_domain_get_default_level(gvm_logging_domain_t *log_domain)
Definition logging_domain.c:224
gvm_logging_domain_new
gvm_logging_domain_t * gvm_logging_domain_new(gchar *log_domain)
Function to initialize logging instance.
Definition logging_domain.c:40
gvm_logging_domain_get_prepend_time_format
gchar * gvm_logging_domain_get_prepend_time_format(gvm_logging_domain_t *log_domain)
Definition logging_domain.c:189
gvm_logging_domain_get_syslog_ident
gchar * gvm_logging_domain_get_syslog_ident(gvm_logging_domain_t *log_domain)
Definition logging_domain.c:292
gvm_logging_domain_set_log_channel
void gvm_logging_domain_set_log_channel(gvm_logging_domain_t *log_domain, GIOChannel *log_channel)
Sets the log channel for the logging domain.
Definition logging_domain.c:374
gvm_logging_domain_free
void gvm_logging_domain_free(gvm_logging_domain_t *log_domain)
Frees the resources associated with the given logging domain.
Definition logging_domain.c:72
gvm_logging_domain_get_log_file
gchar * gvm_logging_domain_get_log_file(gvm_logging_domain_t *log_domain)
Definition logging_domain.c:121
gvm_logging_domain_set_prepend_string
void gvm_logging_domain_set_prepend_string(gvm_logging_domain_t *log_domain, gchar *prepend_string)
Sets the preprend string for the logging domain.
Definition logging_domain.c:171
gvm_logging_domain_get_log_domain
gchar * gvm_logging_domain_get_log_domain(gvm_logging_domain_t *log_domain)
Definition logging_domain.c:105
gvm_logging_domain_set_default_level
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.
Definition logging_domain.c:239
gvm_logging_domain_get_prepend_separator
gchar * gvm_logging_domain_get_prepend_separator(gvm_logging_domain_t *log_domain)
Definition logging_domain.c:325
gvm_logging_domain_get_prepend_string
gchar * gvm_logging_domain_get_prepend_string(gvm_logging_domain_t *log_domain)
Definition logging_domain.c:155
gvm_logging_domain_get_syslog_facility
gchar * gvm_logging_domain_get_syslog_facility(gvm_logging_domain_t *log_domain)
Definition logging_domain.c:258
gvm_logging_domain
Definition logging_domain.c:14
gvm_logging_domain::default_level
GLogLevelFlags * default_level
What severity level to use as default.
Definition logging_domain.c:19
gvm_logging_domain::log_channel
GIOChannel * log_channel
Gio Channel - FD holder for logfile.
Definition logging_domain.c:20
gvm_logging_domain::log_domain
gchar * log_domain
Affected logdomain e.g libnasl.
Definition logging_domain.c:15
gvm_logging_domain::log_file
gchar * log_file
Where to log to.
Definition logging_domain.c:18
gvm_logging_domain::syslog_facility
gchar * syslog_facility
Syslog facility to use for syslog logging.
Definition logging_domain.c:21
gvm_logging_domain::syslog_ident
gchar * syslog_ident
Syslog ident to use for syslog logging.
Definition logging_domain.c:22
gvm_logging_domain::prepend_separator
gchar * prepend_separator
Definition logging_domain.c:23
gvm_logging_domain::prepend_time_format
gchar * prepend_time_format
If prependstring has t, format for strftime.
Definition logging_domain.c:17
gvm_logging_domain::prepend_string
gchar * prepend_string
Prepend this string before every message.
Definition logging_domain.c:16