Skip to content

Commit 0c50261

Browse files
authored
Merge pull request #197 from EmixamPP/fix/fmt-compatibility
fix: compatibility with fmt lib
2 parents 788b91b + 1c9f922 commit 0c50261

3 files changed

Lines changed: 10 additions & 8 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Wed Oct 2 2024 - 6.0.5
2+
- Fix fmt lib compatibility
13
# Fri Sept 30 2024 - 6.0.4
24
- Fix tweak command crashes
35
# Sun Sept 1 2024 - 6.0.3

meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
project(
22
'linux-enable-ir-emitter',
33
'cpp',
4-
version: '6.0.4',
4+
version: '6.0.5',
55
license: 'MIT',
66
default_options: [
77
'cpp_std=c++20',

src/utils/logger.hpp.in

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include <string_view>
55
using namespace std;
66

7-
#include <spdlog/sinks/daily_file_sink.h>
7+
#include <spdlog/sinks/basic_file_sink.h>
88
#include <spdlog/sinks/stdout_color_sinks.h>
99
#include <spdlog/spdlog.h>
1010

@@ -29,7 +29,7 @@ inline void setup(bool verbose_console, bool enable_file) {
2929
if (enable_file) // add file sink if possible
3030
{
3131
try {
32-
auto file_sink = make_shared<spdlog::sinks::daily_file_format_sink_st>(LOG_FILE, 0, 0);
32+
auto file_sink = make_shared<spdlog::sinks::basic_file_sink_st>(LOG_FILE);
3333
file_sink->set_level(spdlog::level::debug);
3434
file_sink->set_pattern("[%H:%M:%S] [%l] %v");
3535

@@ -47,26 +47,26 @@ inline void setup(bool verbose_console, bool enable_file) {
4747

4848
template <typename... Args>
4949
void debug(std::string_view fmt, Args &&...args) {
50-
spdlog::debug(fmt, std::forward<Args>(args)...);
50+
spdlog::debug(SPDLOG_FMT_RUNTIME(fmt), std::forward<Args>(args)...);
5151
}
5252

5353
template <typename... Args>
5454
void info(std::string_view fmt, Args &&...args) {
55-
spdlog::info(fmt, std::forward<Args>(args)...);
55+
spdlog::info(SPDLOG_FMT_RUNTIME(fmt), std::forward<Args>(args)...);
5656
}
5757

5858
template <typename... Args>
5959
void warn(std::string_view fmt, Args &&...args) {
60-
spdlog::warn(fmt, std::forward<Args>(args)...);
60+
spdlog::warn(SPDLOG_FMT_RUNTIME(fmt), std::forward<Args>(args)...);
6161
}
6262

6363
template <typename... Args>
6464
void error(std::string_view fmt, Args &&...args) {
65-
spdlog::error(fmt, std::forward<Args>(args)...);
65+
spdlog::error(SPDLOG_FMT_RUNTIME(fmt), std::forward<Args>(args)...);
6666
}
6767

6868
template <typename... Args>
6969
void critical(std::string_view fmt, Args &&...args) {
70-
spdlog::critical(fmt, std::forward<Args>(args)...);
70+
spdlog::critical(SPDLOG_FMT_RUNTIME(fmt), std::forward<Args>(args)...);
7171
}
7272
} // namespace logger

0 commit comments

Comments
 (0)