3 * Useful macro for use during development.
7 * Ethereal - Network traffic analyzer
8 * By Gerald Combs <gerald@zing.org>
9 * Copyright 2001 Gerald Combs
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
32 /* The last "%s" in g_log() is for the empty-string arg that
33 * g_debug() always passes. */
34 #define _g_debug(format, args...) \
35 g_log(G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, \
36 "%s():%s +%d: " format "%s", \
37 G_GNUC_PRETTY_FUNCTION, __FILE__, __LINE__, ##args) ;
39 /* Always pass a empty-string argument to _g_debug() so that g_debug will always
40 * have at least 2 arguments. If user passes 1 arg to g_debug() (i.e., only
41 * a format string), _g_debug() will still work. */
42 #define g_debug(args...) \
52 g_debug(const char* format, ...)
55 va_start(args, format);
56 vfprintf(stderr, format, args);