diff --git a/include/quill/backend/SignalHandler.h b/include/quill/backend/SignalHandler.h index 839f1891..8ddbeea9 100644 --- a/include/quill/backend/SignalHandler.h +++ b/include/quill/backend/SignalHandler.h @@ -71,16 +71,16 @@ class SignalHandlerContext ~SignalHandlerContext() = default; }; -#define QUILL_SIGNAL_HANDLER_LOG(logger, log_level, fmt, ...) \ - do \ - { \ - if (logger->template should_log_statement()) \ - { \ - static constexpr quill::MacroMetadata macro_metadata{ \ +#define QUILL_SIGNAL_HANDLER_LOG(logger, log_level, fmt, ...) \ + do \ + { \ + if (logger->template should_log_statement()) \ + { \ + static constexpr quill::MacroMetadata macro_metadata{ \ "SignalHandler:~", "", fmt, nullptr, log_level, quill::MacroMetadata::Event::Log}; \ \ logger->template log_statement(quill::LogLevel::None, ¯o_metadata, ##__VA_ARGS__); \ - } \ + } \ } while (0) /***/ @@ -138,7 +138,8 @@ void on_signal(int32_t signal_number) else { // This means signal handler is running on a frontend thread, we can log and flush - LoggerBase* logger_base = detail::LoggerManager::instance().get_valid_logger(SignalHandlerContext::excluded_logger_name_substr); + LoggerBase* logger_base = + detail::LoggerManager::instance().get_valid_logger(SignalHandlerContext::excluded_logger_name_substr); if (logger_base) { @@ -250,7 +251,8 @@ BOOL WINAPI on_console_signal(DWORD signal) (signal == CTRL_C_EVENT || signal == CTRL_BREAK_EVENT)) { // Log the interruption and flush log messages - LoggerBase* logger_base = detail::LoggerManager::instance().get_valid_logger(SignalHandlerContext::excluded_logger_name_substr); + LoggerBase* logger_base = + detail::LoggerManager::instance().get_valid_logger(SignalHandlerContext::excluded_logger_name_substr); if (logger_base) { auto logger = reinterpret_cast*>(logger_base); @@ -277,7 +279,8 @@ LONG WINAPI on_exception(EXCEPTION_POINTERS* exception_p) if ((backend_thread_id != 0) && (current_thread_id != backend_thread_id)) { // Log the interruption and flush log messages - LoggerBase* logger_base = detail::LoggerManager::instance().get_valid_logger(SignalHandlerContext::excluded_logger_name_substr); + LoggerBase* logger_base = + detail::LoggerManager::instance().get_valid_logger(SignalHandlerContext::excluded_logger_name_substr); if (logger_base) { auto logger = reinterpret_cast*>(logger_base);