1/* MiniDLNA media server 2 * Copyright (C) 2008-2010 NETGEAR, Inc. All Rights Reserved. 3 * 4 * This file is part of MiniDLNA. 5 * 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. 10 * 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. 15 * 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. 19 */ 20 21#ifndef __ERR_H__ 22#define __ERR_H__ 23 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 30 31enum _log_facility 32{ 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 43}; 44 45extern int log_level[L_MAX]; 46extern int log_init(const char *fname, const char *debug); 47extern void log_err(int level, enum _log_facility facility, char *fname, int lineno, char *fmt, ...); 48 49//#define DPRINTF(level, facility, fmt, arg...) { log_err(level, facility, __FILE__, __LINE__, fmt, ##arg); } 50#define DPRINTF(level, facility, fmt, arg...) 51 52 53#endif /* __ERR_H__ */ 54