1 /*
2 * This file is part of libdvdnav, a DVD navigation library.
3 *
4  * This program is free software; you can redistribute it and/or modify it
5  * under the terms of the GNU Lesser General Public License as published by
6  * the Free Software Foundation; either version 2.1 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with this program; if not, write to the Free Software Foundation,
16  * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
17 */
18 
19 #ifndef LIBDVDNAV_LOGGER_H
20 #define LIBDVDNAV_LOGGER_H
21 
22 void dvdnav_log( void *priv, const dvdnav_logger_cb *logcb,
23                  dvdnav_logger_level_t level, const char *fmt, ... );
24 
25 #define LOG(ctx, level, ...) \
26   dvdnav_log(ctx->priv, &ctx->logcb, level, __VA_ARGS__)
27 #define Log0(ctx, ...) LOG(ctx, DVDNAV_LOGGER_LEVEL_ERROR, __VA_ARGS__)
28 #define Log1(ctx, ...) LOG(ctx, DVDNAV_LOGGER_LEVEL_WARN,  __VA_ARGS__)
29 #define Log2(ctx, ...) LOG(ctx, DVDNAV_LOGGER_LEVEL_INFO,  __VA_ARGS__)
30 #define Log3(ctx, ...) LOG(ctx, DVDNAV_LOGGER_LEVEL_DEBUG, __VA_ARGS__)
31 
32 #endif
33