Greenbone Vulnerability Management Libraries: base/logging_domain.h Source File

Greenbone Vulnerability Management Libraries 23.1.2

logging_domain.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2025 Greenbone AG
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later
4 */
9
10#ifndef _GVM_BASE_LOGGING_DOMAIN_H
11#define _GVM_BASE_LOGGING_DOMAIN_H
12
13#include <glib.h>
14
15 typedef struct gvm_logging_domain gvm_logging_domain_t;
16
17 gvm_logging_domain_t *
18 gvm_logging_domain_new (gchar *log_domain);
19
20void
21 gvm_logging_domain_free (gvm_logging_domain_t *log_domain);
22
23gchar *
24 gvm_logging_domain_get_log_domain (gvm_logging_domain_t *log_domain);
25
26gchar *
27 gvm_logging_domain_get_log_file (gvm_logging_domain_t *log_domain);
28
29void
30 gvm_logging_domain_set_log_file (gvm_logging_domain_t *log_domain,
31 gchar *log_file);
32
33gchar *
34 gvm_logging_domain_get_prepend_string (gvm_logging_domain_t *log_domain);
35
36void
37 gvm_logging_domain_set_prepend_string (gvm_logging_domain_t *log_domain,
38 gchar *prepend_string);
39
40gchar *
41 gvm_logging_domain_get_prepend_time_format (gvm_logging_domain_t *log_domain);
42
43void
44 gvm_logging_domain_set_prepend_time_format (gvm_logging_domain_t *log_domain,
45 gchar *prepend_time_format);
46
47GLogLevelFlags *
48 gvm_logging_domain_get_default_level (gvm_logging_domain_t *log_domain);
49
50void
51 gvm_logging_domain_set_default_level (gvm_logging_domain_t *log_domain,
52 GLogLevelFlags default_level);
53
54gchar *
55 gvm_logging_domain_get_syslog_facility (gvm_logging_domain_t *log_domain);
56
57void
58 gvm_logging_domain_set_syslog_facility (gvm_logging_domain_t *log_domain,
59 gchar *syslog_facility);
60
61gchar *
62 gvm_logging_domain_get_syslog_ident (gvm_logging_domain_t *log_domain);
63
64void
65 gvm_logging_domain_set_syslog_ident (gvm_logging_domain_t *log_domain,
66 gchar *syslog_ident);
67
68gchar *
69 gvm_logging_domain_get_prepend_separator (gvm_logging_domain_t *log_domain);
70
71void
72 gvm_logging_domain_set_prepend_separator (gvm_logging_domain_t *log_domain,
73 gchar *prepend_separator);
74
75GIOChannel *
76 gvm_logging_domain_get_log_channel (gvm_logging_domain_t *log_domain);
77
78void
79 gvm_logging_domain_set_log_channel (gvm_logging_domain_t *log_domain,
80 GIOChannel *log_channel);
81
82#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