v6.0.0
版本发布时间: 2024-07-27 20:56:14
odygrd/quill最新发布版本:v7.0.0(2024-09-06 06:50:45)
-
Added a Cheat Sheet to help users get the most out of the logging library
-
Removed
ArgSizeCalculator<>
,Encoder<>
, andDecoder<>
classes. These have been consolidated into a singleCodec
class. Users who wish to pass user-defined objects should now specialize this singleCodec
class instead of managing three separate classes. For guidance, please refer to the updated advanced example -
Added
TriviallyCopyableCodec.h
to facilitate serialization for trivially copyable user-defined types. For examplestruct TCStruct { int a; double b; char c[12]; friend std::ostream& operator<<(std::ostream& os, TCStruct const& arg) { os << "a: " << arg.a << ", b: " << arg.b << ", c: " << arg.c; return os; } }; template <> struct fmtquill::formatter<TCStruct> : fmtquill::ostream_formatter { }; template <> struct quill::Codec<TCStruct> : quill::TriviallyCopyableTypeCodec<TCStruct> { }; int main() { // init code ... TCStruct tc; tc.a = 123; tc.b = 321; tc.c[0] = '\0'; LOG_INFO(logger, "{}", tc); }
-
Added support for passing arithmetic or enum c style arrays when
std/Array.h
is included. For example#include "quill/std/Array.h" int a[6] = {123, 456}; LOG_INFO(logger, "a {}", a);
-
Added support for
void const*
formatting. For exampleint a = 123; int* b = &a; LOG_INFO(logger, "{}", fmt::ptr(b));
-
Added support for formatting
std::chrono::time_point
andstd::chrono::duration
with the inclusion ofquill/std/Chrono.h
#include "quill/std/Chrono.h" std::chrono::system_clock::time_point now = std::chrono::system_clock::now(); LOG_INFO(logger, "time is {}", now);
-
Removed unused method from
ConsoleSink
1、 quill-6.0.0.zip 1.93MB