1 /*
2  *  This program is free software; you can redistribute it and/or modify
3  *  it under the terms of the GNU General Public License as published by
4  *  the Free Software Foundation; either version 2 of the License, or
5  *  (at your option) any later version.
6  *
7  *  This program is distributed in the hope that it will be useful,
8  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
9  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10  *  GNU General Public License for more details.
11  *
12  *  You should have received a copy of the GNU General Public License
13  *  along with this program; if not, write to the Free Software
14  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
15  *
16  *  Copyright (C) 2006-2016 XNeur Team
17  *
18  */
19 
20 #ifndef _LOG_H_
21 #define _LOG_H_
22 
23 #define NONE		0
24 #define ERROR		1
25 #define WARNING		2
26 #define LOG			3
27 #define DEBUG		4
28 #define TRACE		5
29 
30 /*
31  * Standard gettext macros.
32  */
33 #ifdef ENABLE_NLS
34 #  include <libintl.h>
35 #  undef _
36 #  define _(String) dgettext (PACKAGE, String)
37 #  define Q_(String) g_strip_context ((String), gettext (String))
38 #  ifdef gettext_noop
39 #    define N_(String) gettext_noop (String)
40 #  else
41 #    define N_(String) (String)
42 #  endif
43 #else
44 #  define textdomain(String) (String)
45 #  define gettext(String) (String)
46 #  define dgettext(Domain,Message) (Message)
47 #  define dcgettext(Domain,Message,Type) (Message)
48 #  define bindtextdomain(Domain,Directory) (Domain)
49 #  define _(String) (String)
50 #  define Q_(String) g_strip_context ((String), (String))
51 #  define N_(String) (String)
52 #endif
53 
54 void log_set_level(int level);
55 void log_message(int type, const char *string, ...);
56 
57 #endif /* _LOG_H_ */
58