libcdio  2.1.0
logging.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2003, 2004, 2008, 2012 Rocky Bernstein <rocky@gnu.org>
3  Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org>
4 
5  This program is free software: you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation, either version 3 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18 
23 
24 #ifndef CDIO_LOGGING_H_
25 #define CDIO_LOGGING_H_
26 
27 #include <cdio/types.h>
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
36 typedef enum {
44 
50 extern cdio_log_level_t cdio_loglevel_default;
51 
63 typedef void (*cdio_log_handler_t) (cdio_log_level_t level,
64  const char message[]);
65 
72 extern void cdio_default_log_handler(cdio_log_level_t level, const char message[]);
73 
85 
98 void cdio_log (cdio_log_level_t level,
99  const char format[], ...) GNUC_PRINTF(2, 3);
100 
106 void cdio_debug (const char format[], ...) GNUC_PRINTF(1,2);
107 
113 void cdio_info (const char format[], ...) GNUC_PRINTF(1,2);
114 
120 void cdio_warn (const char format[], ...) GNUC_PRINTF(1,2);
121 
127 void cdio_error (const char format[], ...) GNUC_PRINTF(1,2);
128 
129 #ifdef __cplusplus
130 }
131 #endif
132 
133 #endif /* CDIO_LOGGING_H_ */
134 
135 
136 /*
137  * Local variables:
138  * c-file-style: "gnu"
139  * tab-width: 8
140  * indent-tabs-mode: nil
141  * End:
142  */
cdio_log_handler_t cdio_log_set_handler(cdio_log_handler_t new_handler)
Definition: logging.h:38
Common type definitions used pervasively in libcdio.
void void void void cdio_warn(const char format[],...) GNUC_PRINTF(1
void(* cdio_log_handler_t)(cdio_log_level_t level, const char message[])
Definition: logging.h:63
cdio_log_level_t
Definition: logging.h:36
cdio_log_level_t cdio_loglevel_default
void void void void void cdio_error(const char format[],...) GNUC_PRINTF(1
Definition: logging.h:42
void cdio_log(cdio_log_level_t level, const char format[],...) GNUC_PRINTF(2
#define GNUC_PRINTF(format_idx, arg_idx)
Definition: types.h:145
Definition: logging.h:37
Definition: logging.h:40
void void void cdio_info(const char format[],...) GNUC_PRINTF(1
Definition: logging.h:41
void void cdio_debug(const char format[],...) GNUC_PRINTF(1
void cdio_default_log_handler(cdio_log_level_t level, const char message[])