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;