Greenbone Vulnerability Management Libraries  22.8.0
logging.h
Go to the documentation of this file.
1 /* SPDX-FileCopyrightText: 2017-2023 Greenbone AG
2  *
3  * SPDX-License-Identifier: GPL-2.0-or-later
4  */
5 
11 #ifndef _GVM_LOGGING_H
12 #define _GVM_LOGGING_H
13 
14 #include <glib.h> /* for GSList, gchar, GLogLevelFlags, gpointer */
15 
20 #define LOG_REFERENCES_AVAILABLE
21 
22 GSList *
23 load_log_configuration (gchar *);
24 
25 void
26 free_log_configuration (GSList *);
27 
28 gchar *
29 get_time (gchar *);
30 
31 void
32 gvm_log_silent (const char *, GLogLevelFlags, const char *, gpointer);
33 void
34 gvm_log_func (const char *, GLogLevelFlags, const char *, gpointer);
35 
36 void
37 log_func_for_gnutls (int, const char *);
38 
39 int
40 setup_log_handlers (GSList *);
41 
42 void
43 gvm_log_lock (void);
44 
45 void
46 gvm_log_unlock (void);
47 
48 void
49 set_log_reference (char *);
50 
51 char *
52 get_log_reference (void);
53 
54 void
55 free_log_reference (void);
56 
57 #endif /* not _GVM_LOGGING_H */
free_log_configuration
void free_log_configuration(GSList *)
Frees all resources loaded by the config loader.
Definition: logging.c:277
log_func_for_gnutls
void log_func_for_gnutls(int, const char *)
This function logs debug messages from gnutls.
Definition: logging.c:818
setup_log_handlers
int setup_log_handlers(GSList *)
Sets up routing of logdomains to log handlers.
Definition: logging.c:887
get_time
gchar * get_time(gchar *)
Returns time as specified in time_fmt strftime format.
Definition: logging.c:68
gvm_log_silent
void gvm_log_silent(const char *, GLogLevelFlags, const char *, gpointer)
Returns immediately.
Definition: logging.c:326
load_log_configuration
GSList * load_log_configuration(gchar *)
Loads parameters from a config file into a linked list.
Definition: logging.c:149
free_log_reference
void free_log_reference(void)
Free the log reference object.
Definition: logging.c:416
set_log_reference
void set_log_reference(char *)
Set the log reference object.
Definition: logging.c:388
gvm_log_func
void gvm_log_func(const char *, GLogLevelFlags, const char *, gpointer)
Creates the formatted string and outputs it to the log destination.
Definition: logging.c:432
gvm_log_unlock
void gvm_log_unlock(void)
Unlock logger_mutex.
Definition: logging.c:367
gvm_log_lock
void gvm_log_lock(void)
Try to lock logger_mutex.
Definition: logging.c:355
get_log_reference
char * get_log_reference(void)
Get the log reference object.
Definition: logging.c:404