]> git.0d.be Git - empathy.git/blob - libempathy/empathy-debug.h
Updated.
[empathy.git] / libempathy / empathy-debug.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3  * Copyright (C) 2006-2007 Imendio AB
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License as
7  * published by the Free Software Foundation; either version 2 of the
8  * License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public
16  * License along with this program; if not, write to the
17  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18  * Boston, MA 02111-1307, USA.
19  *
20  * Authors: Richard Hult <richard@imendio.com>
21  */
22
23 #ifndef __EMPATHY_DEBUG_H__
24 #define __EMPATHY_DEBUG_H__
25
26 #include <glib.h>
27
28 G_BEGIN_DECLS
29
30 #ifdef G_HAVE_ISO_VARARGS
31 #  ifdef EMPATHY_DISABLE_DEBUG
32 #    define empathy_debug(...)
33 #  else
34 #    define empathy_debug(...) empathy_debug_impl (__VA_ARGS__)
35 #  endif
36 #elif defined(G_HAVE_GNUC_VARARGS)
37 #  if EMPATHY_DISABLE_DEBUG
38 #    define empathy_debug(fmt...)
39 #  else
40 #    define empathy_debug(fmt...) empathy_debug_impl(fmt)
41 #  endif
42 #else
43 #  if EMPATHY_DISABLE_DEBUG
44 #    define empathy_debug(x)
45 #  else
46 #    define empathy_debug empathy_debug_impl
47 #  endif
48 #endif
49
50 void empathy_debug_impl                  (const gchar *domain,
51                                           const gchar *msg,
52                                           ...);
53 void empathy_debug_set_log_file_from_env (void);
54
55 G_END_DECLS
56
57 #endif /* __EMPATHY_DEBUG_H__ */
58