From 17b6017fe0093ab67078fe52e73cb1c1a8d001be Mon Sep 17 00:00:00 2001 From: tastytea Date: Tue, 1 Jun 2021 13:20:24 +0200 Subject: [PATCH] =?UTF-8?q?Rename=20init=5Fdebug()=20=E2=86=92=20enable=5F?= =?UTF-8?q?debug(),=20add=20documentation.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/log.cpp | 2 +- src/log.hpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/log.cpp b/src/log.cpp index 4a7a6a1..b6f3c93 100644 --- a/src/log.cpp +++ b/src/log.cpp @@ -81,7 +81,7 @@ void init() blog::add_common_attributes(); } -void init_debug() +void enable_debug() { global.textlog->set_filter(blog::trivial::severity == sev::debug); diff --git a/src/log.hpp b/src/log.hpp index 64919ba..d187ff4 100644 --- a/src/log.hpp +++ b/src/log.hpp @@ -45,9 +45,11 @@ struct global_variables BOOST_LOG_INLINE_GLOBAL_LOGGER_DEFAULT( logger, boost::log::sources::severity_logger_mt) +//! Call this before doing any logging. void init(); -void init_debug(); +//! Enable debug logging. Call after init(). +void enable_debug(); } // namespace epubgrep::log