00001 /* 00002 * Copyright (C) 2005 iptelorg GmbH 00003 * 00004 * This file is part of ser, a free SIP server. 00005 * 00006 * ser is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation; either version 2 of the License, or 00009 * (at your option) any later version 00010 * 00011 * For a license to use the ser software under conditions 00012 * other than those described here, or to purchase support for this 00013 * software, please contact iptel.org by e-mail at the following addresses: 00014 * info@iptel.org 00015 * 00016 * ser is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 * GNU General Public License for more details. 00020 * 00021 * You should have received a copy of the GNU General Public License 00022 * along with this program; if not, write to the Free Software 00023 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00024 */ 00025 00026 #ifndef __LOGGER_H 00027 #define __LOGGER_H 00028 00029 #ifndef SER 00030 00031 #include <stdio.h> 00032 00033 #define ERROR_LOG(a,args...) do{printf(a,##args);}while(0) 00034 #define DEBUG_LOG(a,args...) do{printf(a,##args);}while(0) 00035 #define TRACE_LOG(a,args...) do{printf(a,##args);}while(0) 00036 #define WARN_LOG(a,args...) do{printf(a,##args);}while(0) 00037 #define FLUSH_LOG() do{fflush(stdout);}while(0) 00038 00039 #else 00040 /* TODO: logging for SER */ 00041 00042 #include "dprint.h" 00043 00044 #define ERROR_LOG(a,args...) ERR(a,##args) 00045 #define DEBUG_LOG(a,args...) DBG(a,##args) 00046 /* #define TRACE_LOG(a,args...) ERR(a,##args) */ 00047 #define TRACE_LOG(fmt, args...) LOG(L_ERR, "TRACE: " LOC_INFO fmt, ##args) 00048 #define WARN_LOG(a,args...) WARN(a,##args) 00049 #define FLUSH_LOG() do{}while(0) 00050 00051 #endif 00052 00053 #endif
1.7.1