Don't show recent files menu when in NSM session
[jack_mixer.git] / log.h
blob0cbfeed93ae28f6faa09b912a4ff5236c9878add
1 /* -*- Mode: C ; c-basic-offset: 2 -*- */
2 /*****************************************************************************
4 * Copyright (C) 2006,2007 Nedko Arnaudov <nedko@arnaudov.name>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License
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
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19 *****************************************************************************/
21 #ifndef LOG_H__7097F6FE_4FEE_4962_9542_60375961F567__INCLUDED
22 #define LOG_H__7097F6FE_4FEE_4962_9542_60375961F567__INCLUDED
24 void jack_mixer_log(int level, const char * format, ...);
26 #define LOG_LEVEL_DEBUG 0
27 #define LOG_LEVEL_INFO 1
28 #define LOG_LEVEL_WARNING 2
29 #define LOG_LEVEL_NOTICE 3
30 #define LOG_LEVEL_ERROR 4
31 #define LOG_LEVEL_FATAL 5
32 #define LOG_LEVEL_BLACK_HOLE 6
34 #if !defined(LOG_LEVEL)
35 #define LOG_LEVEL LOG_LEVEL_WARNING
36 #endif
38 #if LOG_LEVEL <= LOG_LEVEL_DEBUG
39 # define LOG_DEBUG(format, ...) \
40 jack_mixer_log(LOG_LEVEL_DEBUG, \
41 format "\n", ## __VA_ARGS__)
42 #else
43 # define LOG_DEBUG(format, ...)
44 #endif
46 #if LOG_LEVEL <= LOG_LEVEL_INFO
47 # define LOG_INFO(format, ...) \
48 jack_mixer_log(LOG_LEVEL_INFO, \
49 format "\n", ## __VA_ARGS__)
50 #else
51 # define LOG_INFO(format, ...)
52 #endif
54 #if LOG_LEVEL <= LOG_LEVEL_WARNING
55 # define LOG_WARNING(format, ...) \
56 jack_mixer_log(LOG_LEVEL_WARNING, \
57 format "\n", ## __VA_ARGS__)
58 #else
59 # define LOG_WARNING(format, ...)
60 #endif
62 #if LOG_LEVEL <= LOG_LEVEL_NOTICE
63 # define LOG_NOTICE(format, ...) \
64 jack_mixer_log(LOG_LEVEL_NOTICE, \
65 format "\n", ## __VA_ARGS__)
66 #else
67 # define LOG_NOTICE(format, ...)
68 #endif
70 #if LOG_LEVEL <= LOG_LEVEL_ERROR
71 # define LOG_ERROR(format, ...) \
72 jack_mixer_log(LOG_LEVEL_ERROR, \
73 format "\n", ## __VA_ARGS__)
74 #else
75 # define LOG_ERROR(format, ...)
76 #endif
78 #if LOG_LEVEL <= LOG_LEVEL_FATAL
79 # define LOG_FATAL(format, ...) \
80 jack_mixer_log(LOG_LEVEL_FATAL, \
81 format "\n", ## __VA_ARGS__)
82 #else
83 # define LOG_FATAL(format, ...)
84 #endif
86 #endif /* #ifndef LOG_H__7097F6FE_4FEE_4962_9542_60375961F567__INCLUDED */