--- a/include/rtpmidid/iobytes.hpp
+++ b/include/rtpmidid/iobytes.hpp
@@ -330,7 +330,7 @@ public:
 
 template <>
 struct fmt::formatter<rtpmidid::io_bytes_reader> : formatter<std::string_view> {
-  auto format(const rtpmidid::io_bytes_reader &data, format_context &ctx) {
+  auto format(const rtpmidid::io_bytes_reader &data, format_context &ctx) const {
     return formatter<std::string_view>::format(
         fmt::format("[io_bytes_reader {} to {}, at {}, {}B left]",
                     (void *)data.start, (void *)data.end, (void *)data.position,
@@ -340,7 +340,7 @@ struct fmt::formatter<rtpmidid::io_bytes
 };
 template <>
 struct fmt::formatter<rtpmidid::io_bytes_writer> : formatter<std::string_view> {
-  auto format(const rtpmidid::io_bytes_reader &data, format_context &ctx) {
+  auto format(const rtpmidid::io_bytes_reader &data, format_context &ctx) const {
     return formatter<std::string_view>::format(
         fmt::format("[io_bytes_writer {} to {}, at {}, {}B left]",
                     (void *)data.start, (void *)data.end, (void *)data.position,
--- a/include/rtpmidid/network.hpp
+++ b/include/rtpmidid/network.hpp
@@ -24,7 +24,7 @@
 
 template <>
 struct fmt::formatter<sockaddr_storage> : formatter<std::string_view> {
-  auto format(const sockaddr_storage &addr, format_context &ctx) {
+  auto format(const sockaddr_storage &addr, format_context &ctx) const {
     // print ip address and port
     char name[INET6_ADDRSTRLEN];
     if (addr.ss_family == AF_INET) {
--- a/include/rtpmidid/rtpclient.hpp
+++ b/include/rtpmidid/rtpclient.hpp
@@ -99,7 +99,7 @@ template <>
 struct fmt::formatter<rtpmidid::rtpclient_t::endpoint_t>
     : formatter<std::string_view> {
   auto format(const rtpmidid::rtpclient_t::endpoint_t &data,
-              format_context &ctx) {
+              format_context &ctx) const {
     return formatter<std::string_view>::format(
         fmt::format("[endpoint_t [{}]:{}]", data.hostname, data.port), ctx);
   }
@@ -109,7 +109,7 @@ template <>
 struct fmt::formatter<std::vector<rtpmidid::rtpclient_t::endpoint_t>>
     : formatter<std::string_view> {
   auto format(const std::vector<rtpmidid::rtpclient_t::endpoint_t> &data,
-              format_context &ctx) {
+              format_context &ctx) const {
     std::string result;
     for (auto &endpoint : data) {
       result +=
@@ -123,7 +123,7 @@ template <>
 struct fmt::formatter<std::list<rtpmidid::rtpclient_t::endpoint_t>>
     : formatter<std::string_view> {
   auto format(const std::list<rtpmidid::rtpclient_t::endpoint_t> &data,
-              format_context &ctx) {
+              format_context &ctx) const {
     std::string result = "[";
     for (auto &endpoint : data) {
       result += fmt::format("[endpoint_t [{}]:{}] ", endpoint.hostname,
--- a/include/rtpmidid/rtppeer.hpp
+++ b/include/rtpmidid/rtppeer.hpp
@@ -152,7 +152,7 @@ public:
 template <>
 struct fmt::formatter<rtpmidid::rtppeer_t::status_e>
     : formatter<std::string_view> {
-  auto format(rtpmidid::rtppeer_t::status_e c, format_context &ctx) {
+  auto format(rtpmidid::rtppeer_t::status_e c, format_context &ctx) const {
     std::string_view name = "UNKNOWN";
     switch (c) {
     case rtpmidid::rtppeer_t::status_e::NOT_CONNECTED:
@@ -175,7 +175,7 @@ struct fmt::formatter<rtpmidid::rtppeer_
 template <>
 struct fmt::formatter<rtpmidid::rtppeer_t::port_e>
     : formatter<std::string_view> {
-  auto format(rtpmidid::rtppeer_t::port_e c, format_context &ctx) {
+  auto format(rtpmidid::rtppeer_t::port_e c, format_context &ctx) const {
     const char *name = "UNKNOWN"; // NOLINT
     switch (c) {
     case rtpmidid::rtppeer_t::port_e::MIDI_PORT:
@@ -192,7 +192,7 @@ struct fmt::formatter<rtpmidid::rtppeer_
 template <>
 struct fmt::formatter<rtpmidid::rtppeer_t::disconnect_reason_e>
     : formatter<std::string_view> {
-  auto format(rtpmidid::rtppeer_t::disconnect_reason_e c, format_context &ctx) {
+  auto format(rtpmidid::rtppeer_t::disconnect_reason_e c, format_context &ctx) const {
     const char *name = "UNKNOWN"; // NOLINT
     switch (c) {
     case rtpmidid::rtppeer_t::disconnect_reason_e::CANT_CONNECT:
--- a/lib/mdns_rtpmidi.cpp
+++ b/lib/mdns_rtpmidi.cpp
@@ -52,12 +52,12 @@ struct AvahiEntryGroup {
 rtpmidid::mdns_rtpmidi_t *current = nullptr;
 
 template <> struct fmt::formatter<AvahiWatchEvent> : fmt::formatter<int> {
-  auto format(AvahiWatchEvent ev, fmt::format_context &ctx) {
+  auto format(AvahiWatchEvent ev, fmt::format_context &ctx) const {
     return fmt::formatter<int>::format((int)ev, ctx);
   }
 };
 template <> struct fmt::formatter<AvahiBrowserEvent> : fmt::formatter<int> {
-  auto format(AvahiBrowserEvent ev, fmt::format_context &ctx) {
+  auto format(AvahiBrowserEvent ev, fmt::format_context &ctx) const {
     return fmt::formatter<int>::format((int)ev, ctx);
   }
 };
--- a/src/aseq.hpp
+++ b/src/aseq.hpp
@@ -152,7 +152,7 @@ template <> struct hash<rtpmididns::aseq
 template <>
 struct fmt::formatter<rtpmididns::aseq_t::port_t>
     : formatter<std::string_view> {
-  auto format(rtpmididns::aseq_t::port_t c, format_context &ctx) {
+  auto format(rtpmididns::aseq_t::port_t c, format_context &ctx) const {
     auto name = fmt::format("port_t[{}, {}]", c.client, c.port);
     return formatter<std::string_view>::format(name, ctx);
   }
--- a/src/mididata.hpp
+++ b/src/mididata.hpp
@@ -37,9 +37,9 @@ public:
 
 template <>
 struct fmt::formatter<rtpmididns::mididata_t> : formatter<std::string_view> {
-  auto format(const rtpmididns::mididata_t &data, format_context &ctx) {
+  auto format(const rtpmididns::mididata_t &data, format_context &ctx) const {
 
     return fmt::format_to(ctx.out(), "[mididata_t {} + {}, at {}]",
                           (void *)data.start, data.size(), data.pos());
   }
-};
\ No newline at end of file
+};
--- a/src/settings.hpp
+++ b/src/settings.hpp
@@ -58,7 +58,7 @@ template <>
 struct fmt::formatter<rtpmididns::settings_t::alsa_announce_t>
     : formatter<std::string_view> {
   auto format(const rtpmididns::settings_t::alsa_announce_t &data,
-              format_context &ctx) {
+              format_context &ctx) const {
 
     return fmt::format_to(ctx.out(), "[alsa_announce_t {}]", data.name);
   }
@@ -68,7 +68,7 @@ template <>
 struct fmt::formatter<std::vector<rtpmididns::settings_t::alsa_announce_t>>
     : formatter<std::string_view> {
   auto format(const std::vector<rtpmididns::settings_t::alsa_announce_t> &data,
-              format_context &ctx) {
+              format_context &ctx) const {
     std::string result = "[";
     for (auto &item : data) {
       result += fmt::format("[{}] ", item.name);
@@ -82,7 +82,7 @@ template <>
 struct fmt::formatter<rtpmididns::settings_t::rtpmidi_announce_t>
     : formatter<std::string_view> {
   auto format(const rtpmididns::settings_t::rtpmidi_announce_t &data,
-              format_context &ctx) {
+              format_context &ctx) const {
 
     return fmt::format_to(ctx.out(), "[rtpmidi_announce_t {} {}]", data.name,
                           data.port);
@@ -94,7 +94,7 @@ struct fmt::formatter<std::vector<rtpmid
     : formatter<std::string_view> {
   auto
   format(const std::vector<rtpmididns::settings_t::rtpmidi_announce_t> &data,
-         format_context &ctx) {
+         format_context &ctx) const {
     std::string result = "[";
     for (auto &item : data) {
       result +=
@@ -109,7 +109,7 @@ template <>
 struct fmt::formatter<rtpmididns::settings_t::connect_to_t>
     : formatter<std::string_view> {
   auto format(const rtpmididns::settings_t::connect_to_t &data,
-              format_context &ctx) {
+              format_context &ctx) const {
 
     return fmt::format_to(ctx.out(), "[connect_to_t {} {} {}]", data.hostname,
                           data.port, data.name);
@@ -120,7 +120,7 @@ template <>
 struct fmt::formatter<std::vector<rtpmididns::settings_t::connect_to_t>>
     : formatter<std::string_view> {
   auto format(const std::vector<rtpmididns::settings_t::connect_to_t> &data,
-              format_context &ctx) {
+              format_context &ctx) const {
     std::string result = "[";
     for (auto &item : data) {
       result += fmt::format("[connect_to_t {} {} {}] ", item.hostname,
@@ -133,7 +133,7 @@ struct fmt::formatter<std::vector<rtpmid
 
 template <>
 struct fmt::formatter<rtpmididns::settings_t> : formatter<std::string_view> {
-  auto format(const rtpmididns::settings_t &data, format_context &ctx) {
+  auto format(const rtpmididns::settings_t &data, format_context &ctx) const {
 
     return fmt::format_to(ctx.out(),
                           "[settings_t alsa_name: {} alsa_network: {} "
