mirror of
https://github.com/gabime/spdlog.git
synced 2025-11-16 09:28:56 +08:00
Add NOTICE, ALERT and EMERG log level.
This commit introduces 3 new log level. Thoses are:
+ NOTICE, which is a bit worse that INFO, but still not a warn.
+ ALERT, for case worse that critical.
+ EMERG, application is unusable.
With those 3 log levels, spdlog now has all log level accepted by
the syslog() system call.
This commit is contained in:
@@ -101,6 +101,12 @@ inline spdlog::details::line_logger spdlog::logger::info(const Args&... args)
|
||||
return log(level::INFO, args...);
|
||||
}
|
||||
|
||||
template <typename... Args>
|
||||
inline spdlog::details::line_logger spdlog::logger::notice(const Args&... args)
|
||||
{
|
||||
return log(level::NOTICE, args...);
|
||||
}
|
||||
|
||||
template <typename... Args>
|
||||
inline spdlog::details::line_logger spdlog::logger::warn(const Args&... args)
|
||||
{
|
||||
@@ -119,6 +125,18 @@ inline spdlog::details::line_logger spdlog::logger::critical(const Args&... args
|
||||
return log(level::CRITICAL, args...);
|
||||
}
|
||||
|
||||
template <typename... Args>
|
||||
inline spdlog::details::line_logger spdlog::logger::alert(const Args&... args)
|
||||
{
|
||||
return log(level::ALERT, args...);
|
||||
}
|
||||
|
||||
template <typename... Args>
|
||||
inline spdlog::details::line_logger spdlog::logger::emerg(const Args&... args)
|
||||
{
|
||||
return log(level::EMERG, args...);
|
||||
}
|
||||
|
||||
inline const std::string& spdlog::logger::name() const
|
||||
{
|
||||
return _name;
|
||||
|
||||
Reference in New Issue
Block a user