I've been working on LOGCXX-514(using fmt as an alternative layout to
the PatternLayout) and I've got a working implementation on Linux.
However, the Windows build currently fails with some sort of symbol or
linking error. Since I'm not all that familiar with Windows, would
somebody with more expe
In Visual studio 2019 the line
fmt::arg("d", event->getChronoTimeStamp()),
causes the compile time error:
error C2338: Cannot format an argument. To make type T formattable provide
a formatter specialization: https://fmt.dev/latest/api.html#udt
It seems to need a formatter specialization fo
Odd. How would we format the timestamp in that case? According to
the documentation, fmt has formatters for std::chrono::time_point
already.
Is this some sort of difference between MSVC and gcc? It should be
trying to format
std::chrono::time_point, which I
thought was std::chrono::system_clock
Fmt seems to have a formatter for std::chrono::time_point templated by
std::chrono::system_clock and (optionally) std::chrono::utc_clock if my
interpretation of the fmt/chrono.h code in the https://github.com/fmtlib
master branch is correct.
Quoting from https://en.cppreference.com/w/cpp/chrono/hi
It looks like I was overcomplicating this. The constructor for a
std::chrono::time_point does take in a duration from the clock's
epoch, which is ultimately what we want to do.
PR up on github for review.
-Robert Middleton
On Sat, Nov 26, 2022 at 11:10 PM Stephen Webb wrote:
>
> Fmt seems to h