Skip to content

Commit

Permalink
Upgraded spdlog dependency to 1.12
Browse files Browse the repository at this point in the history
The spdlog library introduced some non-backward-compatible changes
between version 1.9.2 (packaged with Ubuntu 22.04) and version 1.12
(packaged with Ubuntu 24.04). Specifically, standard library containers
are only log-printable if the new header <spdlog/fmt/ranges.h> is
included, and user-defined types are only log-printable if they
explicitly specialize fmt::formatter<T> (including <spdlog/fmt/ostr.h>
is no longer sufficient).
  • Loading branch information
etremel committed Oct 17, 2024
1 parent ba3a417 commit 0fd8f27
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ find_package(mutils REQUIRED)
find_package(mutils-containers REQUIRED)

# Target: spdlog::spdlog
find_package(spdlog 1.3.1...1.9.2 REQUIRED)
find_package(spdlog 1.12.0 REQUIRED)

# Target: OpenSSL::Crypto and OpenSSL::ssl
find_package(OpenSSL 1.1.1 REQUIRED)
Expand Down
1 change: 1 addition & 0 deletions include/derecho/utils/logger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <atomic>
#include <spdlog/spdlog.h>
#include <spdlog/fmt/ostr.h>
#include <spdlog/fmt/ranges.h>
#include <spdlog/sinks/rotating_file_sink.h>
#include <spdlog/sinks/stdout_color_sinks.h>

Expand Down
3 changes: 3 additions & 0 deletions src/applications/tests/unit_tests/client_callback_mockup.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ enum class ClientCallbackType {

std::ostream& operator<<(std::ostream& os, const ClientCallbackType& cb_type);

template <>
struct fmt::formatter<ClientCallbackType> : fmt::ostream_formatter {};

/**
* Structure used by StorageNode to pass callback requests from the
* register_callback RPC function to the callback-sending thread.
Expand Down

0 comments on commit 0fd8f27

Please sign in to comment.