diff --git a/example/example.cpp b/example/example.cpp index e0d78c96..b273c451 100644 --- a/example/example.cpp +++ b/example/example.cpp @@ -143,10 +143,10 @@ void callback_example() { // Define the callbacks spdlog::custom_log_callbacks callbacks; - callbacks.on_log_formatted = [](std::string str){ + callbacks.on_log_formatted = [](std::string /*str*/){ // do what you need to do with str }; - callbacks.on_log = [](spdlog::details::log_msg msg){ + callbacks.on_log = [](spdlog::details::log_msg /*msg*/){ // do what you need to do with msg }; diff --git a/include/spdlog/sinks/callback_sink.h b/include/spdlog/sinks/callback_sink.h index c6327e0f..68c82864 100644 --- a/include/spdlog/sinks/callback_sink.h +++ b/include/spdlog/sinks/callback_sink.h @@ -15,14 +15,13 @@ namespace spdlog { // callbacks struct struct custom_log_callbacks { - custom_log_callbacks() : on_log(nullptr) , on_log_formatted(nullptr) {} - std::function on_log_formatted; std::function on_log; + std::function on_log_formatted; }; namespace sinks {