support for const char* messages

This commit is contained in:
gabime
2019-03-23 20:06:49 +02:00
parent 4c240edf94
commit 569c62e528
2 changed files with 59 additions and 5 deletions

View File

@@ -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);