The Battle for Wesnoth  1.13.4+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 - 2016 by Mark de Wever <[email protected]>
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 #ifndef GUI_AUXILIARY_LOG_HPP_INCLUDED
21 #define GUI_AUXILIARY_LOG_HPP_INCLUDED
22 
23 #include "../../log.hpp" // We want the file in src/
24 
25 namespace gui2
26 {
27 
29 #define DBG_GUI_D LOG_STREAM_INDENT(debug, gui2::log_gui_draw)
30 #define LOG_GUI_D LOG_STREAM_INDENT(info, gui2::log_gui_draw)
31 #define WRN_GUI_D LOG_STREAM_INDENT(warn, gui2::log_gui_draw)
32 #define ERR_GUI_D LOG_STREAM_INDENT(err, gui2::log_gui_draw)
33 
35 #define DBG_GUI_E LOG_STREAM_INDENT(debug, gui2::log_gui_event)
36 #define LOG_GUI_E LOG_STREAM_INDENT(info, gui2::log_gui_event)
37 #define WRN_GUI_E LOG_STREAM_INDENT(warn, gui2::log_gui_event)
38 #define ERR_GUI_E LOG_STREAM_INDENT(err, gui2::log_gui_event)
39 
41 #define DBG_GUI_G LOG_STREAM_INDENT(debug, gui2::log_gui_general)
42 #define LOG_GUI_G LOG_STREAM_INDENT(info, gui2::log_gui_general)
43 #define WRN_GUI_G LOG_STREAM_INDENT(warn, gui2::log_gui_general)
44 #define ERR_GUI_G LOG_STREAM_INDENT(err, gui2::log_gui_general)
45 
47 #define TST_GUI_I \
48  if(lg::debug().dont_log(gui2::log_gui_iterator)) \
49  ; \
50  else \
51  lg::debug()(gui2::log_gui_iterator, false, false)
52 #define DBG_GUI_I LOG_STREAM_INDENT(debug, gui2::log_gui_iterator)
53 #define LOG_GUI_I LOG_STREAM_INDENT(info, gui2::log_gui_iterator)
54 #define WRN_GUI_I LOG_STREAM_INDENT(warn, gui2::log_gui_iterator)
55 #define ERR_GUI_I LOG_STREAM_INDENT(err, gui2::log_gui_iterator)
56 
58 #define DBG_GUI_L LOG_STREAM_INDENT(debug, gui2::log_gui_layout)
59 #define LOG_GUI_L LOG_STREAM_INDENT(info, gui2::log_gui_layout)
60 #define WRN_GUI_L LOG_STREAM_INDENT(warn, gui2::log_gui_layout)
61 #define ERR_GUI_L LOG_STREAM_INDENT(err, gui2::log_gui_layout)
62 
64 // lifetime logging only makes sense in debug level anyway
65 #define DBG_GUI_LF LOG_STREAM_INDENT(debug, gui2::log_gui_lifetime)
66 
67 
69 #define DBG_GUI_P LOG_STREAM_INDENT(debug, gui2::log_gui_parse)
70 #define LOG_GUI_P LOG_STREAM_INDENT(info, gui2::log_gui_parse)
71 #define WRN_GUI_P LOG_STREAM_INDENT(warn, gui2::log_gui_parse)
72 #define ERR_GUI_P LOG_STREAM_INDENT(err, gui2::log_gui_parse)
73 
74 } // namespace gui2
75 
76 #endif
lg::log_domain log_gui_event("gui/event")
Definition: log.hpp:34
lg::log_domain log_gui_layout("gui/layout")
Definition: log.hpp:57
A class inherited from ttext_box that displays its input as stars.
Definition: field-fwd.hpp:23
lg::log_domain log_gui_parse("gui/parse")
Definition: log.hpp:68
lg::log_domain log_gui_iterator("gui/iterator")
Definition: log.hpp:46
lg::log_domain log_gui_draw("gui/draw")
Definition: log.hpp:28
lg::log_domain log_gui_general("gui/general")
Definition: log.hpp:40
lg::log_domain log_gui_lifetime("gui/lifetime")
Definition: log.hpp:63