minidlna support now Samsung TV C550/C650 (thx amir909)
[tomato.git] / release / src / router / minidlna / log.h
blobb0dde74a6239baafa8533e87415bbd6cce2943d2
1 /* MiniDLNA media server
2 * Copyright (C) 2008-2010 NETGEAR, Inc. All Rights Reserved.
4 * This file is part of MiniDLNA.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 #ifndef __ERR_H__
22 #define __ERR_H__
24 #define E_OFF 0
25 #define E_FATAL 1
26 #define E_ERROR 2
27 #define E_WARN 3
28 #define E_INFO 4
29 #define E_DEBUG 5
31 enum _log_facility
33 L_GENERAL=0,
34 L_ARTWORK,
35 L_DB_SQL,
36 L_INOTIFY,
37 L_SCANNER,
38 L_METADATA,
39 L_HTTP,
40 L_SSDP,
41 L_TIVO,
42 L_MAX
45 extern int log_level[L_MAX];
46 extern int log_init(const char *fname, const char *debug);
47 extern void log_err(int level, enum _log_facility facility, char *fname, int lineno, char *fmt, ...);
49 #define DPRINTF(level, facility, fmt, arg...) { log_err(level, facility, __FILE__, __LINE__, fmt, ##arg); }
52 #endif /* __ERR_H__ */