1 /* RTMP Dump 2 * Copyright (C) 2008-2009 Andrej Stepanchuk 3 * Copyright (C) 2009 Howard Chu 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 2, or (at your option) 8 * 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 flvstreamer; see the file COPYING. If not, write to 17 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 18 * http://www.gnu.org/copyleft/gpl.html 19 * 20 */ 21 22 #ifndef __LOG_H__ 23 #define __LOG_H__ 24 25 #include <stdio.h> 26 27 #ifdef __cplusplus 28 extern "C" { 29 #endif 30 /* Enable this to get full debugging output */ 31 /* #define _DEBUG */ 32 33 #ifdef _DEBUG 34 #undef NODEBUG 35 #endif 36 37 typedef enum 38 { LOGCRIT=0, LOGERROR, LOGWARNING, LOGINFO, 39 LOGDEBUG, LOGDEBUG2, LOGALL 40 } AMF_LogLevel; 41 42 #define Log AMF_Log 43 #define LogHex AMF_LogHex 44 #define LogHexString AMF_LogHexString 45 #define LogPrintf AMF_LogPrintf 46 #define LogSetOutput AMF_LogSetOutput 47 #define LogStatus AMF_LogStatus 48 #define debuglevel AMF_debuglevel 49 50 extern AMF_LogLevel debuglevel; 51 52 void LogSetOutput(FILE *file); 53 void LogPrintf(const char *format, ...); 54 void LogStatus(const char *format, ...); 55 void Log(int level, const char *format, ...); 56 void LogHex(int level, const char *data, unsigned long len); 57 void LogHexString(int level, const char *data, unsigned long len); 58 59 #ifdef __cplusplus 60 } 61 #endif 62 #endif 63