Fix broken unit test

This log definition really shouldn't work. It seems to rely on log
timestamps being globally disabled during tests. However that's what
it was set up to do, so i am not changing it more than necessary.
This commit is contained in:
Tommy 2022-07-18 17:45:48 +12:00
parent ba24612f73
commit 9e15bae76c
2 changed files with 4 additions and 1 deletions

View File

@ -45,7 +45,7 @@ extern lg::log_domain log_gui_general;
extern lg::log_domain log_gui_iterator;
#define TST_GUI_I LOG_STREAM_NAMELESS(debug, gui2::log_gui_iterator)
#define TST_GUI_I LOG_STREAM_NAMELESS_STREAMING(debug, gui2::log_gui_iterator)
#define DBG_GUI_I LOG_STREAM_INDENT(debug, gui2::log_gui_iterator)
#define LOG_GUI_I LOG_STREAM_INDENT(info, gui2::log_gui_iterator)
#define WRN_GUI_I LOG_STREAM_INDENT(warn, gui2::log_gui_iterator)

View File

@ -226,6 +226,9 @@ std::stringstream& log_to_chat();
// Don't prefix the logdomain to messages on this stream
#define LOG_STREAM_NAMELESS(level, domain) if (lg::level().dont_log(domain)) ; else lg::level()(domain, false) | formatter()
// Like LOG_STREAM_NAMELESS except doesn't add newlines automatically
#define LOG_STREAM_NAMELESS_STREAMING(level, domain) if (lg::level().dont_log(domain)) ; else lg::level()(domain, false, false, true, true, false) | formatter()
// When using log_scope/log_scope2 it is nice to have all output indented.
#define LOG_STREAM_INDENT(level,domain) if (lg::level().dont_log(domain)) ; else lg::level()(domain, true, true) | formatter()