mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-30 02:19:35 +08:00
support for const char* messages
This commit is contained in:
@@ -24,7 +24,6 @@ bool spdlog::lite::logger::should_log(spdlog::lite::level level) const SPDLOG_NO
|
||||
}
|
||||
|
||||
|
||||
|
||||
void spdlog::lite::logger::log_formatted_(const spdlog::lite::src_loc &src, spdlog::lite::level lvl, const fmt::memory_buffer &formatted)
|
||||
{
|
||||
auto spd_level = to_spdlog_level(lvl);
|
||||
@@ -32,11 +31,19 @@ void spdlog::lite::logger::log_formatted_(const spdlog::lite::src_loc &src, spdl
|
||||
impl_->log(source_loc, spd_level, spdlog::details::fmt_helper::to_string_view(formatted));
|
||||
}
|
||||
|
||||
void spdlog::lite::logger::log_formatted_(spdlog::lite::level level, const fmt::memory_buffer &formatted)
|
||||
void spdlog::lite::logger::log_string_view_(const spdlog::lite::src_loc &src, spdlog::lite::level lvl, const string_view_t &sv)
|
||||
{
|
||||
log_formatted_(src_loc{}, level, formatted);
|
||||
auto spd_level = to_spdlog_level(lvl);
|
||||
spdlog::source_loc source_loc{src.filename, src.line, src.funcname};
|
||||
impl_->log(source_loc, spd_level, sv);
|
||||
}
|
||||
|
||||
void spdlog::lite::logger::log_string_view_(spdlog::lite::level lvl, const string_view_t &sv)
|
||||
{
|
||||
log_string_view_(spdlog::lite::src_loc{}, lvl, sv);
|
||||
}
|
||||
|
||||
|
||||
void spdlog::lite::logger::set_level(spdlog::lite::level level)
|
||||
{
|
||||
auto spd_level = to_spdlog_level(level);
|
||||
|
Reference in New Issue
Block a user