1 /*
2  * This file is part of Licq, an instant messaging client for UNIX.
3  * Copyright (C) 2013 Licq Developers <licq-dev@googlegroups.com>
4  *
5  * Please refer to the COPYRIGHT file distributed with this source
6  * distribution for the names of the individual contributors.
7  *
8  * Licq is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * Licq is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with Licq; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
21  */
22 
23 #ifndef LICQJABBER_DEBUG_H
24 #define LICQJABBER_DEBUG_H
25 
26 #ifndef TRACE_FORMAT
27 #define TRACE_FORMAT ""
28 #endif
29 
30 #ifdef __GNUC__
31 
32 #ifdef TRACE_ARGS
33 #define TRACE(fmt, ...)                                                 \
34   Licq::gLog.debug(TRACE_FORMAT fmt, TRACE_ARGS, ## __VA_ARGS__)
35 #else
36 #define TRACE(fmt, ...)                                                 \
37   Licq::gLog.debug(TRACE_FORMAT fmt, ## __VA_ARGS__)
38 #endif
39 
40 #else
41 
42 #define TRACE(...)
43 
44 #endif
45 
46 #endif
47