2 * Copyright (C) 2008-2009 Andrej Stepanchuk
3 * Copyright (C) 2009-2010 Howard Chu
5 * This file is part of librtmp.
7 * librtmp is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as
9 * published by the Free Software Foundation; either version 2.1,
10 * or (at your option) any later version.
12 * librtmp is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with librtmp see the file COPYING. If not, write to
19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 * Boston, MA 02110-1301, USA.
21 * http://www.gnu.org/copyleft/lgpl.html
24 #ifndef __RTMP_LOG_H__
25 #define __RTMP_LOG_H__
34 /* Enable this to get full debugging output */
42 { RTMP_LOGCRIT
=0, RTMP_LOGERROR
, RTMP_LOGWARNING
, RTMP_LOGINFO
,
43 RTMP_LOGDEBUG
, RTMP_LOGDEBUG2
, RTMP_LOGALL
46 extern RTMP_LogLevel RTMP_debuglevel
;
48 typedef void (RTMP_LogCallback
)(int level
, const char *fmt
, va_list);
49 void RTMP_LogSetCallback(RTMP_LogCallback
*cb
);
50 void RTMP_LogSetOutput(FILE *file
);
52 void RTMP_LogPrintf(const char *format
, ...) __attribute__ ((__format__ (__printf__
, 1, 2)));
53 void RTMP_LogStatus(const char *format
, ...) __attribute__ ((__format__ (__printf__
, 1, 2)));
54 void RTMP_Log(int level
, const char *format
, ...) __attribute__ ((__format__ (__printf__
, 2, 3)));
56 void RTMP_LogPrintf(const char *format
, ...);
57 void RTMP_LogStatus(const char *format
, ...);
58 void RTMP_Log(int level
, const char *format
, ...);
60 void RTMP_LogHex(int level
, const uint8_t *data
, unsigned long len
);
61 void RTMP_LogHexString(int level
, const uint8_t *data
, unsigned long len
);
62 void RTMP_LogSetLevel(RTMP_LogLevel lvl
);
63 RTMP_LogLevel
RTMP_LogGetLevel(void);