mirror of
https://github.com/gabime/spdlog.git
synced 2025-01-16 17:47:57 +00:00
Compare commits
2 Commits
ae02fba141
...
99abcf6ded
Author | SHA1 | Date | |
---|---|---|---|
|
99abcf6ded | ||
|
7009727559 |
@ -47,6 +47,16 @@ SPDLOG_INLINE void dump_backtrace()
|
||||
default_logger_raw()->dump_backtrace();
|
||||
}
|
||||
|
||||
SPDLOG_API level::level_enum get_level()
|
||||
{
|
||||
return default_logger_raw()->level();
|
||||
}
|
||||
|
||||
SPDLOG_INLINE bool should_log(level::level_enum log_level)
|
||||
{
|
||||
return default_logger_raw()->should_log(log_level);
|
||||
}
|
||||
|
||||
SPDLOG_INLINE void set_level(level::level_enum log_level)
|
||||
{
|
||||
details::registry::instance().set_level(log_level);
|
||||
@ -112,4 +122,4 @@ SPDLOG_INLINE void set_default_logger(std::shared_ptr<spdlog::logger> default_lo
|
||||
details::registry::instance().set_default_logger(std::move(default_logger));
|
||||
}
|
||||
|
||||
} // namespace spdlog
|
||||
} // namespace spdlog
|
||||
|
@ -67,9 +67,15 @@ SPDLOG_API void disable_backtrace();
|
||||
// call dump backtrace on default logger
|
||||
SPDLOG_API void dump_backtrace();
|
||||
|
||||
// Get global logging level
|
||||
SPDLOG_API level::level_enum get_level();
|
||||
|
||||
// Set global logging level
|
||||
SPDLOG_API void set_level(level::level_enum log_level);
|
||||
|
||||
// Determine whether the default logger should log messages with a certain level
|
||||
SPDLOG_API bool should_log(level::level_enum lvl);
|
||||
|
||||
// Set global flush level
|
||||
SPDLOG_API void flush_on(level::level_enum log_level);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user