diff options
Diffstat (limited to 'src/common/logging/backend.cpp')
| -rw-r--r-- | src/common/logging/backend.cpp | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp index 618be0864..aeb4249f8 100644 --- a/src/common/logging/backend.cpp +++ b/src/common/logging/backend.cpp | |||
| @@ -2,11 +2,8 @@ | |||
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include <algorithm> | 5 | #include <utility> |
| 6 | #include <array> | ||
| 7 | #include <cstdio> | ||
| 8 | #include "common/assert.h" | 6 | #include "common/assert.h" |
| 9 | #include "common/common_funcs.h" // snprintf compatibility define | ||
| 10 | #include "common/logging/backend.h" | 7 | #include "common/logging/backend.h" |
| 11 | #include "common/logging/filter.h" | 8 | #include "common/logging/filter.h" |
| 12 | #include "common/logging/log.h" | 9 | #include "common/logging/log.h" |
| @@ -132,21 +129,6 @@ void SetFilter(Filter* new_filter) { | |||
| 132 | filter = new_filter; | 129 | filter = new_filter; |
| 133 | } | 130 | } |
| 134 | 131 | ||
| 135 | void LogMessage(Class log_class, Level log_level, const char* filename, unsigned int line_num, | ||
| 136 | const char* function, const char* format, ...) { | ||
| 137 | if (filter && !filter->CheckMessage(log_class, log_level)) | ||
| 138 | return; | ||
| 139 | std::array<char, 4 * 1024> formatting_buffer; | ||
| 140 | va_list args; | ||
| 141 | va_start(args, format); | ||
| 142 | vsnprintf(formatting_buffer.data(), formatting_buffer.size(), format, args); | ||
| 143 | va_end(args); | ||
| 144 | Entry entry = CreateEntry(log_class, log_level, filename, line_num, function, | ||
| 145 | std::string(formatting_buffer.data())); | ||
| 146 | |||
| 147 | PrintColoredMessage(entry); | ||
| 148 | } | ||
| 149 | |||
| 150 | void FmtLogMessageImpl(Class log_class, Level log_level, const char* filename, | 132 | void FmtLogMessageImpl(Class log_class, Level log_level, const char* filename, |
| 151 | unsigned int line_num, const char* function, const char* format, | 133 | unsigned int line_num, const char* function, const char* format, |
| 152 | const fmt::format_args& args) { | 134 | const fmt::format_args& args) { |