diff --git a/include/spdlog/details/registry.h b/include/spdlog/details/registry.h index d9b586a5..b069c3f5 100644 --- a/include/spdlog/details/registry.h +++ b/include/spdlog/details/registry.h @@ -99,7 +99,7 @@ private: std::unique_ptr formatter_; spdlog::level::level_enum global_log_level_ = level::info; level::level_enum flush_level_ = level::off; - void (*err_handler_)(const std::string &msg); + void (*err_handler_)(const std::string &msg) = nullptr; std::shared_ptr tp_; std::unique_ptr periodic_flusher_; std::shared_ptr default_logger_;