Function set_formatter

Synopsis

#include <include/spdlog/spdlog.h>

SPDLOG_INLINE void set_formatter(std::unique_ptr< spdlog::formatter > formatter)

Description

Set global formatter. Each sink in each logger will get a clone of this object.

Mentioned in

Source

Lines 25-28 in include/spdlog/spdlog-inl.h. Line 55 in include/spdlog/spdlog.h.

SPDLOG_INLINE void set_formatter(std::unique_ptr<spdlog::formatter> formatter)
{
    details::registry::instance().set_formatter(std::move(formatter));
}





Add Discussion

Log in to comment