Lumiera  0.pre.03
»edit your freedom«
logging.h
Go to the documentation of this file.
1 /*
2  logging.h - Configure basic nobug logging
3 
4  Copyright (C) Lumiera.org
5  2008, 2009 Christian Thaeter <ct@pipapo.org>
6  Hermann Vosseler <Ichthyostega@web.de>
7 
8  This program is free software; you can redistribute it and/or
9  modify it under the terms of the GNU General Public License as
10  published by the Free Software Foundation; either version 2 of
11  the License, or (at your option) any later version.
12 
13  This program 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 this program; if not, write to the Free Software
20  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 
22 */
23 
24 #ifndef LUMIERA_LOGGING_H
25 #define LUMIERA_LOGGING_H
26 
65 #include <nobug.h>
66 
68 #ifndef LUMIERA_NOBUG_INIT_CPP
69 #undef NOBUG_DECLARE_ONLY
70 #define NOBUG_DECLARE_ONLY 1
71 #endif
72 
75 
76 
78 NOBUG_CPP_DEFINE_FLAG_PARENT ( debugging, all);
80 NOBUG_CPP_DEFINE_FLAG_PARENT ( main_dbg, debugging);
82 NOBUG_CPP_DEFINE_FLAG_PARENT ( backend_dbg, debugging);
83 NOBUG_CPP_DEFINE_FLAG_PARENT ( file_dbg, backend_dbg);
84 NOBUG_CPP_DEFINE_FLAG_PARENT ( filehandle_dbg, backend_dbg);
85 NOBUG_CPP_DEFINE_FLAG_PARENT ( filehandlecache_dbg, backend_dbg);
86 NOBUG_CPP_DEFINE_FLAG_PARENT ( filedescriptor_dbg, backend_dbg);
87 NOBUG_CPP_DEFINE_FLAG_PARENT ( mmap_dbg, backend_dbg);
88 NOBUG_CPP_DEFINE_FLAG_PARENT ( mmapcache_dbg, backend_dbg);
89 NOBUG_CPP_DEFINE_FLAG_PARENT ( mmapings_dbg, backend_dbg);
90 NOBUG_CPP_DEFINE_FLAG_PARENT ( thread_dbg, backend_dbg);
91 NOBUG_CPP_DEFINE_FLAG_PARENT ( threads_dbg, thread_dbg);
92 NOBUG_CPP_DEFINE_FLAG_PARENT ( threadpool_dbg, thread_dbg);
93 NOBUG_CPP_DEFINE_FLAG_PARENT ( fileheader_dbg, backend_dbg);
94 
96 NOBUG_CPP_DEFINE_FLAG_PARENT ( proc_dbg, debugging);
97 NOBUG_CPP_DEFINE_FLAG_PARENT ( command_dbg, proc_dbg);
98 NOBUG_CPP_DEFINE_FLAG_PARENT ( session_dbg, proc_dbg);
99 NOBUG_CPP_DEFINE_FLAG_PARENT ( player_dbg, proc_dbg);
100 NOBUG_CPP_DEFINE_FLAG_PARENT ( engine_dbg, proc_dbg);
102 NOBUG_CPP_DEFINE_FLAG_PARENT ( gui_dbg, debugging);
104 NOBUG_CPP_DEFINE_FLAG_PARENT ( library_dbg, debugging);
105 NOBUG_CPP_DEFINE_FLAG_PARENT ( mpool_dbg, library_dbg);
106 NOBUG_CPP_DEFINE_FLAG_PARENT ( psplay_dbg, library_dbg);
107 NOBUG_CPP_DEFINE_FLAG_PARENT ( priqueue, library_dbg);
108 NOBUG_CPP_DEFINE_FLAG_PARENT ( resourcecollector_dbg, library_dbg);
109 NOBUG_CPP_DEFINE_FLAG_PARENT ( mutex_dbg, library_dbg);
110 NOBUG_CPP_DEFINE_FLAG_PARENT ( cond_dbg, library_dbg);
112 NOBUG_CPP_DEFINE_FLAG_PARENT ( common_dbg, debugging);
113 NOBUG_CPP_DEFINE_FLAG_PARENT ( config_dbg, common_dbg);
114 NOBUG_CPP_DEFINE_FLAG_PARENT ( configfile_dbg, config_dbg);
115 NOBUG_CPP_DEFINE_FLAG_PARENT ( configitem_dbg, config_dbg);
116 NOBUG_CPP_DEFINE_FLAG_PARENT ( configtyped_dbg, config_dbg);
117 NOBUG_CPP_DEFINE_FLAG_PARENT ( configlookup_dbg, config_dbg);
118 NOBUG_CPP_DEFINE_FLAG_PARENT ( interface_dbg, common_dbg);
119 NOBUG_CPP_DEFINE_FLAG_PARENT ( interfaceregistry_dbg, interface_dbg);
120 NOBUG_CPP_DEFINE_FLAG_PARENT ( pluginloader_dbg, common_dbg);
121 NOBUG_CPP_DEFINE_FLAG_PARENT ( plugins_dbg, debugging);
122 
123 
125 NOBUG_CPP_DEFINE_FLAG_PARENT ( logging, all);
127 NOBUG_CPP_DEFINE_FLAG_PARENT ( progress, logging);
132 NOBUG_CPP_DEFINE_FLAG_PARENT ( mmap, vault); //mmap errors
133 NOBUG_CPP_DEFINE_FLAG_PARENT ( thread, vault); //starting/stopping threads
134 NOBUG_CPP_DEFINE_FLAG_PARENT ( threads, thread);
135 NOBUG_CPP_DEFINE_FLAG_PARENT ( threadpool, thread);
136 NOBUG_CPP_DEFINE_FLAG_PARENT ( fileheader, vault);
152 NOBUG_CPP_DEFINE_FLAG_PARENT ( library, progress);
153 NOBUG_CPP_DEFINE_FLAG_PARENT ( filesys, library); //filesystem operations, opening/closing files...
155 NOBUG_CPP_DEFINE_FLAG_PARENT ( common, progress);
157 NOBUG_CPP_DEFINE_FLAG_PARENT ( configsys, common); //TODO: here seems to be an ambiguity weather "config" should denote the global config channel or the config-loder internals
158 NOBUG_CPP_DEFINE_FLAG_PARENT ( configfiles, configsys); //reading, writing, lookup configfiles
159 NOBUG_CPP_DEFINE_FLAG_PARENT ( configtyped, configsys); //values queried, errors
161 NOBUG_CPP_DEFINE_FLAG_PARENT ( etd, common);
162 NOBUG_CPP_DEFINE_FLAG_PARENT ( diff, etd);
164 NOBUG_CPP_DEFINE_FLAG_PARENT ( interface, common);
165 NOBUG_CPP_DEFINE_FLAG_PARENT ( interfaceregistry, common); //interfaces which get registered/removed
166 NOBUG_CPP_DEFINE_FLAG_PARENT ( guifacade, common);
167 NOBUG_CPP_DEFINE_FLAG_PARENT ( subsystem, common);
169 NOBUG_CPP_DEFINE_FLAG_PARENT ( pluginloader, common); //plugins loaded/unloaded/errors
171 NOBUG_CPP_DEFINE_FLAG_PARENT ( plugins, progress);
174 NOBUG_CPP_DEFINE_FLAG_PARENT ( config, logging); //TODO: here seems to be an ambiguity weather "config" should denote the global config channel or the config-loder internals
175 NOBUG_CPP_DEFINE_FLAG_PARENT ( rules, config);
176 NOBUG_CPP_DEFINE_FLAG_PARENT ( query, config);
177 NOBUG_CPP_DEFINE_FLAG_PARENT ( resolver, config);
178 
182 NOBUG_CPP_DEFINE_FLAG_PARENT ( sync, logging); // do we need subsections here? backend_mutex_sync proc_mutex_sync etc?
183 NOBUG_CPP_DEFINE_FLAG_PARENT ( mutex_sync, sync); //locking/unlocking mutexes
184 NOBUG_CPP_DEFINE_FLAG_PARENT ( cond_sync, sync); //waiting and signalling condition vars
186 NOBUG_CPP_DEFINE_FLAG_PARENT ( memory, logging);
188 NOBUG_CPP_DEFINE_FLAG_PARENT ( proc_mem, memory);
189 NOBUG_CPP_DEFINE_FLAG_PARENT ( mobject_mem, proc_mem);
190 NOBUG_CPP_DEFINE_FLAG_PARENT ( builder_mem, proc_mem);
191 NOBUG_CPP_DEFINE_FLAG_PARENT ( asset_mem, proc_mem);
192 
193 
195 NOBUG_CPP_DEFINE_FLAG_PARENT ( events, all);
197 NOBUG_CPP_DEFINE_FLAG_PARENT ( gui_event, all);
198 
199 
200 
201 #ifndef LUMIERA_NOBUG_INIT_CPP
202 #undef NOBUG_DECLARE_ONLY
203 #define NOBUG_DECLARE_ONLY 0
204 #endif
205 
206 #endif
int main(int argc, const char *argv[])
run all tests or any single test specified in the first command line argument.
Definition: testrunner.cpp:47
Definition: run.hpp:49
Steam-Layer implementation namespace root.
Namespace of Session and user visible high-level objects.
Definition: sequence.hpp:74
NOBUG_CPP_DEFINE_FLAG(all)
the root switch for all logging
Lumiera GTK UI implementation root.
Definition: guifacade.cpp:46
NOBUG_CPP_DEFINE_FLAG_PARENT(debugging, all)
debug logging
Vault-Layer implementation namespace root.