OpenVAS Libraries  8.0.3
openvas_logging.h
Go to the documentation of this file.
1 /* openvas-libraries/misc
2  * $Id$
3  * Description: Implementation of logging methods for openvas
4  *
5  * Authors:
6  * Laban Mwangi <lmwangi@penguinlabs.co.ke>
7  *
8  * Copyright:
9  * Copyright (C) 2009 PenguinLabs Limited
10  *
11  * This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License version 2,
13  * or, at your option, any later version as published by the Free
14  * Software Foundation
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software
23  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
24  */
25 
26 #ifndef _OPENVAS_LOGGING_H
27 #define _OPENVAS_LOGGING_H
28 
29 #include <glib.h>
30 #include <time.h>
31 
32 GSList *load_log_configuration (gchar *);
33 
34 void free_log_configuration (GSList *);
35 
36 gchar *get_time (gchar *);
37 
38 void openvas_log_silent (const char *, GLogLevelFlags, const char *, gpointer);
39 void openvas_log_func (const char *, GLogLevelFlags, const char *, gpointer);
40 
41 void setup_log_handlers (GSList *);
42 
43 void setup_legacy_log_handler (void (*)(const char *, va_list));
44 void log_legacy_write (const char *, ...) G_GNUC_PRINTF (1, 2);
45 void log_legacy_fflush (void);
46 
47 #endif /* not _OPENVAS_LOGGING_H */
void setup_legacy_log_handler(void(*)(const char *, va_list))
Sets up a simple logging function.
Definition: openvas_logging.c:818
GSList * load_log_configuration(gchar *)
Loads parameters from a config file into a linked list.
Definition: openvas_logging.c:176
gchar * get_time(gchar *)
Returns time as specified in time_fmt strftime format.
Definition: openvas_logging.c:96
void setup_log_handlers(GSList *)
Sets up routing of logdomains to log handlers.
Definition: openvas_logging.c:743
void void log_legacy_fflush(void)
Legacy function to flush a log message.
Definition: openvas_logging.c:852
void log_legacy_write(const char *,...) G_GNUC_PRINTF(1
void openvas_log_silent(const char *, GLogLevelFlags, const char *, gpointer)
Returns immediately.
Definition: openvas_logging.c:346
void openvas_log_func(const char *, GLogLevelFlags, const char *, gpointer)
Creates the formatted string and outputs it to the log destination.
Definition: openvas_logging.c:390
void free_log_configuration(GSList *)
Frees all resources loaded by the config loader.
Definition: openvas_logging.c:298