From d89a1e66d8a59f049635c0a86100f042840f8aea Mon Sep 17 00:00:00 2001 From: Kevin Slattery Date: Thu, 12 May 2022 19:49:01 -0500 Subject: [PATCH] Add default file-event_handler callbacks. #2374 --- include/spdlog/common.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/spdlog/common.h b/include/spdlog/common.h index 9ab886f5..1ea5a903 100644 --- a/include/spdlog/common.h +++ b/include/spdlog/common.h @@ -306,6 +306,13 @@ struct source_loc struct file_event_handlers { + file_event_handlers() + : before_open([](spdlog::filename_t) {}) + , after_open ([](spdlog::filename_t, std::FILE*) {}) + , before_close([](spdlog::filename_t, std::FILE*) {}) + , after_close([](spdlog::filename_t) {}) + {} + std::function before_open; std::function after_open; std::function before_close;