mirror of
https://github.com/AxioDL/logvisor.git
synced 2025-05-16 12:21:22 +00:00
Lockless return when no loggers are registered
This commit is contained in:
parent
f8ab0e03ba
commit
f20a62749e
@ -173,6 +173,8 @@ public:
|
||||
template <typename CharType>
|
||||
inline void report(Level severity, const CharType* format, ...)
|
||||
{
|
||||
if (MainLoggers.empty() && severity != Level::Fatal)
|
||||
return;
|
||||
va_list ap;
|
||||
va_start(ap, format);
|
||||
report(severity, format, ap);
|
||||
@ -208,6 +210,8 @@ public:
|
||||
template <typename CharType>
|
||||
inline void reportSource(Level severity, const char* file, unsigned linenum, const CharType* format, ...)
|
||||
{
|
||||
if (MainLoggers.empty() && severity != Level::Fatal)
|
||||
return;
|
||||
va_list ap;
|
||||
va_start(ap, format);
|
||||
reportSource(severity, file, linenum, format, ap);
|
||||
|
Loading…
x
Reference in New Issue
Block a user