Custom formatter for flag 't', new Utils::GetThreadName()
This commit is contained in:
@@ -10,6 +10,8 @@
|
||||
#define SPDLOG_TRACE_ON
|
||||
|
||||
#include <spdlog/spdlog.h>
|
||||
#include <spdlog/sinks/stdout_color_sinks.h>
|
||||
#include <spdlog/pattern_formatter.h>
|
||||
|
||||
namespace OpenVulkano
|
||||
{
|
||||
@@ -48,4 +50,12 @@ namespace OpenVulkano
|
||||
|
||||
static void RegisterSink(const spdlog::sink_ptr& newSink);
|
||||
};
|
||||
|
||||
class CustomThreadNameFormatterFlag : public spdlog::custom_flag_formatter
|
||||
{
|
||||
public:
|
||||
void format(const spdlog::details::log_msg &msg, const std::tm &tmTime, spdlog::memory_buf_t &dest) override;
|
||||
std::unique_ptr<spdlog::custom_flag_formatter> clone() const override;
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user