Skip to content

Commit

Permalink
OrcLib: Log: SpdlogLogger: fix possible build issue with fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
fabienfl-orc committed May 5, 2023
1 parent c863454 commit 4ae6773
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/OrcLib/Log/SpdlogLogger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ const std::vector<SpdlogSink::Ptr>& SpdlogLogger::Sinks()
return m_sinks;
}

void SpdlogLogger::Log(const std::chrono::system_clock::time_point& timepoint, Log::Level level, std::wstring_view msg)
void SpdlogLogger::Log(const std::chrono::system_clock::time_point& timepoint, Log::Level level, fmt::wstring_view msg)
{
const auto utf8 = ToUtf8(msg);
const auto utf8 = ToUtf8(std::wstring_view(msg.data(), msg.size()));
Log(timepoint, level, utf8);
}

Expand Down
4 changes: 2 additions & 2 deletions src/OrcLib/Log/SpdlogLogger.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class SpdlogLogger

const std::vector<SpdlogSink::Ptr>& Sinks();

inline void Log(const std::chrono::system_clock::time_point& timepoint, Log::Level level, std::string_view msg)
inline void Log(const std::chrono::system_clock::time_point& timepoint, Log::Level level, fmt::string_view msg)
{
if (level >= m_backtraceTrigger && m_backtraceTrigger != Level::Off)
{
Expand All @@ -63,7 +63,7 @@ class SpdlogLogger
m_logger->log(timepoint, spdlog::source_loc {}, static_cast<spdlog::level::level_enum>(level), msg);
}

void Log(const std::chrono::system_clock::time_point& timepoint, Log::Level level, std::wstring_view msg);
void Log(const std::chrono::system_clock::time_point& timepoint, Log::Level level, fmt::wstring_view msg);

template <typename... Args>
inline void Trace(Args&&... args)
Expand Down

0 comments on commit 4ae6773

Please sign in to comment.