libcdio 2.1.1
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
30extern "C" {
31#endif
32
44
51
63typedef void (*cdio_log_handler_t) (cdio_log_level_t level,
64 const char message[]);
65
72extern void cdio_default_log_handler(cdio_log_level_t level, const char message[]);
73
85
99 const char format[], ...) GNUC_PRINTF(2, 3);
100
106void cdio_debug (const char format[], ...) GNUC_PRINTF(1,2);
107
113void cdio_info (const char format[], ...) GNUC_PRINTF(1,2);
114
120void cdio_warn (const char format[], ...) GNUC_PRINTF(1,2);
121
127void 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_level_t
Definition logging.h:36
@ CDIO_LOG_INFO
Definition logging.h:38
@ CDIO_LOG_WARN
Definition logging.h:40
@ CDIO_LOG_ERROR
Definition logging.h:41
@ CDIO_LOG_ASSERT
Definition logging.h:42
@ CDIO_LOG_DEBUG
Definition logging.h:37
void void void cdio_info(const char format[],...) GNUC_PRINTF(1
void void void void void cdio_error(const char format[],...) GNUC_PRINTF(1
void cdio_default_log_handler(cdio_log_level_t level, const char message[])
cdio_log_level_t cdio_loglevel_default
void(* cdio_log_handler_t)(cdio_log_level_t level, const char message[])
Definition logging.h:63
void cdio_log(cdio_log_level_t level, const char format[],...) GNUC_PRINTF(2
void void void void cdio_warn(const char format[],...) GNUC_PRINTF(1
void void cdio_debug(const char format[],...) GNUC_PRINTF(1
cdio_log_handler_t cdio_log_set_handler(cdio_log_handler_t new_handler)
Common type definitions used pervasively in libcdio.
#define GNUC_PRINTF(format_idx, arg_idx)
Definition types.h:126