The Battle for Wesnoth  1.13.11+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
log.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2009 - 2018 by Mark de Wever <koraq@xs4all.nl>
3  Part of the Battle for Wesnoth Project http://www.wesnoth.org/
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY.
11 
12  See the COPYING file for more details.
13 */
14 
15 /**
16  * @file
17  * Define the common log macros for the gui toolkit.
18  */
19 
20 #pragma once
21 
22 #include "../../log.hpp" // We want the file in src/
23 
24 namespace gui2
25 {
26 
28 #define DBG_GUI_D LOG_STREAM_INDENT(debug, gui2::log_gui_draw)
29 #define LOG_GUI_D LOG_STREAM_INDENT(info, gui2::log_gui_draw)
30 #define WRN_GUI_D LOG_STREAM_INDENT(warn, gui2::log_gui_draw)
31 #define ERR_GUI_D LOG_STREAM_INDENT(err, gui2::log_gui_draw)
32 
34 #define DBG_GUI_E LOG_STREAM_INDENT(debug, gui2::log_gui_event)
35 #define LOG_GUI_E LOG_STREAM_INDENT(info, gui2::log_gui_event)
36 #define WRN_GUI_E LOG_STREAM_INDENT(warn, gui2::log_gui_event)
37 #define ERR_GUI_E LOG_STREAM_INDENT(err, gui2::log_gui_event)
38 
40 #define DBG_GUI_G LOG_STREAM_INDENT(debug, gui2::log_gui_general)
41 #define LOG_GUI_G LOG_STREAM_INDENT(info, gui2::log_gui_general)
42 #define WRN_GUI_G LOG_STREAM_INDENT(warn, gui2::log_gui_general)
43 #define ERR_GUI_G LOG_STREAM_INDENT(err, gui2::log_gui_general)
44 
46 #define TST_GUI_I \
47  if(lg::debug().dont_log(gui2::log_gui_iterator)) \
48  ; \
49  else \
50  lg::debug()(gui2::log_gui_iterator, false, false)
51 #define DBG_GUI_I LOG_STREAM_INDENT(debug, gui2::log_gui_iterator)
52 #define LOG_GUI_I LOG_STREAM_INDENT(info, gui2::log_gui_iterator)
53 #define WRN_GUI_I LOG_STREAM_INDENT(warn, gui2::log_gui_iterator)
54 #define ERR_GUI_I LOG_STREAM_INDENT(err, gui2::log_gui_iterator)
55 
57 #define DBG_GUI_L LOG_STREAM_INDENT(debug, gui2::log_gui_layout)
58 #define LOG_GUI_L LOG_STREAM_INDENT(info, gui2::log_gui_layout)
59 #define WRN_GUI_L LOG_STREAM_INDENT(warn, gui2::log_gui_layout)
60 #define ERR_GUI_L LOG_STREAM_INDENT(err, gui2::log_gui_layout)
61 
63 // lifetime logging only makes sense in debug level anyway
64 #define DBG_GUI_LF LOG_STREAM_INDENT(debug, gui2::log_gui_lifetime)
65 
66 
68 #define DBG_GUI_P LOG_STREAM_INDENT(debug, gui2::log_gui_parse)
69 #define LOG_GUI_P LOG_STREAM_INDENT(info, gui2::log_gui_parse)
70 #define WRN_GUI_P LOG_STREAM_INDENT(warn, gui2::log_gui_parse)
71 #define ERR_GUI_P LOG_STREAM_INDENT(err, gui2::log_gui_parse)
72 
73 } // namespace gui2
lg::log_domain log_gui_event("gui/event")
Definition: log.hpp:33
lg::log_domain log_gui_layout("gui/layout")
Definition: log.hpp:56
Generic file dialog.
Definition: field-fwd.hpp:22
lg::log_domain log_gui_parse("gui/parse")
Definition: log.hpp:67
lg::log_domain log_gui_iterator("gui/iterator")
Definition: log.hpp:45
lg::log_domain log_gui_draw("gui/draw")
Definition: log.hpp:27
lg::log_domain log_gui_general("gui/general")
Definition: log.hpp:39
lg::log_domain log_gui_lifetime("gui/lifetime")
Definition: log.hpp:62