Relace remaining const char* with string_view_t in the API

This commit is contained in:
gabime 2019-07-07 12:55:56 +03:00
parent 506ab1c735
commit 8d758add63
2 changed files with 5 additions and 5 deletions

View File

@ -58,7 +58,7 @@ SPDLOG_INLINE void swap(logger &a, logger &b)
a.swap(b);
}
SPDLOG_INLINE void logger::log(source_loc loc, level::level_enum lvl, const char *msg)
SPDLOG_INLINE void logger::log(source_loc loc, level::level_enum lvl, string_view_t msg)
{
if (!should_log(lvl))
{
@ -67,7 +67,7 @@ SPDLOG_INLINE void logger::log(source_loc loc, level::level_enum lvl, const char
try
{
details::log_msg log_msg(loc, string_view_t(name_), lvl, string_view_t(msg));
details::log_msg log_msg(loc, string_view_t(name_), lvl, msg);
sink_it_(log_msg);
}
catch (const std::exception &ex)
@ -80,7 +80,7 @@ SPDLOG_INLINE void logger::log(source_loc loc, level::level_enum lvl, const char
}
}
SPDLOG_INLINE void logger::log(level::level_enum lvl, const char *msg)
SPDLOG_INLINE void logger::log(level::level_enum lvl, string_view_t msg)
{
log(source_loc{}, lvl, msg);
}

View File

@ -97,8 +97,8 @@ public:
log(source_loc{}, lvl, fmt, args...);
}
void log(source_loc loc, level::level_enum lvl, const char *msg);
void log(level::level_enum lvl, const char *msg);
void log(source_loc loc, level::level_enum lvl, const string_view_t msg);
void log(level::level_enum lvl, string_view_t msg);
template<typename... Args>
void trace(string_view_t fmt, const Args &... args)