I'm using msvc, now I need a logger function that can: [list] [*]acquire the caller's name automatically [*]can receive variadic args just like fmt::format or std::format [/list] I tried the following: [list] [*]use macro, it works, but it's not easy to encapsulate into a class. [*]use stacktrace library. these libraries requires pdb file but I just need embedded name strings. [*]use [code]std::source_location::current()[/code], I tried to use both [code]std::source_location[/code] and template argument pack [code]Args&&... args[/code] like that: [/list] [code]#include #include #include
I'm using msvc, now I need a logger function that can:
acquire the caller's name automatically can receive variadic args just like fmt::format or std::format
I tried the following:
use macro, it works, but it's not easy to encapsulate into a...
У меня есть оболочка класса Python для функции ведения журнала.
Моя проблема с этими решениями — параметры ведения журнала %(asctime)s: %(levelname)s>> %(message)s не будет ссылаться на исходный вызывающий метод write .
Пример того, о чем я говорю,...
У меня есть оболочка класса Python для функции ведения журнала.
Моя проблема с этими решениями — параметры ведения журнала %(asctime)s: %(levelname)s>> %(message)s не будет ссылаться на исходный вызывающий метод write .
Пример того, о чем я говорю,...
У меня есть оболочка класса Python для функции ведения журнала.
Моя проблема с этими решениями — параметры ведения журнала %(asctime)s: %(levelname)s>> %(message)s не будет ссылаться на исходный вызывающий метод write .
Пример того, о чем я говорю,...