CPPMyth
Library to interoperate with MythTV server
Loading...
Searching...
No Matches
debug.h
1
/*
2
* Copyright (C) 2014-2015 Jean-Luc Barriere
3
*
4
* This library is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU Lesser General Public License as published
6
* by the Free Software Foundation; either version 3, or (at your option)
7
* any later version.
8
*
9
* This library 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 library; see the file COPYING. If not, write to
16
* the Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
17
* MA 02110-1301 USA
18
* http://www.gnu.org/copyleft/gpl.html
19
*
20
*/
21
22
#ifndef DEBUG_H
23
#define DEBUG_H
24
25
#include "local_config.h"
26
27
#define DBG_NONE -1
28
#define DBG_ERROR 0
29
#define DBG_WARN 1
30
#define DBG_INFO 2
31
#define DBG_DEBUG 3
32
#define DBG_PROTO 4
33
#define DBG_ALL 6
34
35
namespace
NSROOT
36
{
37
38
#define DBG(lv, fmt, ...) \
39
do {if(lv<=NSROOT::_dbgLevel) NSROOT::_writeDBGMsg(lv,fmt,__VA_ARGS__);} while(0)
40
41
#define DBGS(lv, str) \
42
do {if(lv<=NSROOT::_dbgLevel) NSROOT::_writeDBGMsg(lv,str);} while(0)
43
44
extern
int
_dbgLevel;
45
46
void
_setDBGMsgCallback(
void
(*msgcb)(
int
level,
char
*));
47
void
_writeDBGMsg(
int
level,
const
char
* fmt, ...);
48
}
49
50
#endif
/* DEBUG_H */
51
cppmyth
src
private
debug.h
Generated on
for CPPMyth by
1.15.0