Debian Codegraph @

src/util/simplelog.h

raw symbols SCIP
1 /* simplelog.c - Simple logging subsystem for Poldi
2 Copyright (C) 2008 g10 Code GmbH
3
4 This file is part of Poldi.
5
6 Poldi is free software; you can redistribute it and/or modify it
7 under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
10
11 Poldi is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, see
18 <http://www.gnu.org/licenses/>. */
19
20 #ifndef SIMPLELOG_H
21 #define SIMPLELOG_Hcxx . . $ `src/util/simplelog.h:21:9`!
22
23 #include <stdarg.h>
24 #include <stdio.h>
25
26 #include <gpg-error.h>
27
28 typedef struct log_handlecxx . . $ log_handle# *log_handle_tcxx . . $ log_handle_t#;
29
30 #define LOG_FLAG_WITH_PREFIXcxx . . $ `src/util/simplelog.h:30:9`! (1 << 0)
31 #define LOG_FLAG_WITH_TIMEcxx . . $ `src/util/simplelog.h:31:9`! (1 << 1)
32 #define LOG_FLAG_WITH_PIDcxx . . $ `src/util/simplelog.h:32:9`! (1 << 2)
33
34 typedef enumcxx . . $ $anonymous_type_e4ac3917cf2fa7be_0#
35 {
36 LOG_BACKEND_NONEcxx . . $ LOG_BACKEND_NONE.,
37 LOG_BACKEND_STREAMcxx . . $ LOG_BACKEND_STREAM.,
38 LOG_BACKEND_FILEcxx . . $ LOG_BACKEND_FILE.,
39 LOG_BACKEND_SYSLOGcxx . . $ LOG_BACKEND_SYSLOG.
40 } log_backend_tcxx . . $ log_backend_t#;
41
42 typedef enumcxx . . $ $anonymous_type_e4ac3917cf2fa7be_1#
43 {
44 LOG_LEVEL_DEBUGcxx . . $ LOG_LEVEL_DEBUG. = 1,
45 LOG_LEVEL_INFOcxx . . $ LOG_LEVEL_INFO.,
46 LOG_LEVEL_ERRORcxx . . $ LOG_LEVEL_ERROR.,
47 LOG_LEVEL_FATALcxx . . $ LOG_LEVEL_FATAL.
48 } log_level_tcxx . . $ log_level_t#;
49
50 #define LOG_PREFIX_LENGTHcxx . . $ `src/util/simplelog.h:50:9`! 128
51
52 gpg_error_tcxx . . $ gpg_error_t# log_createcxx . . $ log_create(ae9175ffffc76e55). (log_handle_tcxx . . $ log_handle_t# *handle);
53 void log_destroycxx . . $ log_destroy(c6d31a59c40299be). (log_handle_tcxx . . $ log_handle_t# handle);
54
55 void log_set_flagscxx . . $ log_set_flags(a836c67e96798efc). (log_handle_tcxx . . $ log_handle_t# handle, unsigned int flags);
56 void log_unset_flagscxx . . $ log_unset_flags(a836c67e96798efc). (log_handle_tcxx . . $ log_handle_t# handle, unsigned int flags);
57 void log_set_prefixcxx . . $ log_set_prefix(d0a2023680b6f78d). (log_handle_tcxx . . $ log_handle_t# handle, const char *prefix);
58 void log_set_min_levelcxx . . $ log_set_min_level(af723febd09b6652). (log_handle_tcxx . . $ log_handle_t# handle, log_level_tcxx . . $ log_level_t# min_level);
59
60 gpg_error_tcxx . . $ gpg_error_t# log_set_backend_streamcxx . . $ log_set_backend_stream(79a3f3539912b772). (log_handle_tcxx . . $ log_handle_t# handle, FILEcxx . . $ FILE# *fp);
61 gpg_error_tcxx . . $ gpg_error_t# log_set_backend_filecxx . . $ log_set_backend_file(91a1806cddc17828). (log_handle_tcxx . . $ log_handle_t# handle, const char *filename);
62 gpg_error_tcxx . . $ gpg_error_t# log_set_backend_syslogcxx . . $ log_set_backend_syslog(7a673cb698c395e0). (log_handle_tcxx . . $ log_handle_t# handle);
63
64 gpg_error_tcxx . . $ gpg_error_t# log_writecxx . . $ log_write(ad0f2dca42ab2e70). (log_handle_tcxx . . $ log_handle_t# handle, log_level_tcxx . . $ log_level_t# level,
65 const char *fmt, ...);
66 gpg_error_tcxx . . $ gpg_error_t# log_write_vacxx . . $ log_write_va(247b63e26cc1c53c). (log_handle_tcxx . . $ log_handle_t# handle, log_level_tcxx . . $ log_level_t# level,
67 const char *fmt, va_listcxx . . $ va_list# ap);
68
69 gpg_error_tcxx . . $ gpg_error_t# log_msg_debugcxx . . $ log_msg_debug(628bea2675049132). (log_handle_tcxx . . $ log_handle_t# handle, const char *fmt, ...);
70 gpg_error_tcxx . . $ gpg_error_t# log_msg_infocxx . . $ log_msg_info(628bea2675049132). (log_handle_tcxx . . $ log_handle_t# handle, const char *fmt, ...);
71 gpg_error_tcxx . . $ gpg_error_t# log_msg_errorcxx . . $ log_msg_error(628bea2675049132). (log_handle_tcxx . . $ log_handle_t# handle, const char *fmt, ...);
72 gpg_error_tcxx . . $ gpg_error_t# log_msg_fatalcxx . . $ log_msg_fatal(628bea2675049132). (log_handle_tcxx . . $ log_handle_t# handle, const char *fmt, ...);
73
74 #endif