diff options
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2015-03-06 19:15:02 +0100 |
---|---|---|
committer | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2015-03-06 19:23:52 +0100 |
commit | 0aa44e238db7a72f4fb8b347168ec76c3ce48ad5 (patch) | |
tree | dba02c60d0a663708265089394c634a655417f9d /src/common/logging/backend.cpp | |
parent | Merge pull request #630 from archshift/swap (diff) | |
download | yuzu-0aa44e238db7a72f4fb8b347168ec76c3ce48ad5.tar yuzu-0aa44e238db7a72f4fb8b347168ec76c3ce48ad5.tar.gz yuzu-0aa44e238db7a72f4fb8b347168ec76c3ce48ad5.tar.bz2 yuzu-0aa44e238db7a72f4fb8b347168ec76c3ce48ad5.tar.lz yuzu-0aa44e238db7a72f4fb8b347168ec76c3ce48ad5.tar.xz yuzu-0aa44e238db7a72f4fb8b347168ec76c3ce48ad5.tar.zst yuzu-0aa44e238db7a72f4fb8b347168ec76c3ce48ad5.zip |
Diffstat (limited to '')
-rw-r--r-- | src/common/logging/backend.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp index 7c1010b22..7b479b569 100644 --- a/src/common/logging/backend.cpp +++ b/src/common/logging/backend.cpp @@ -135,9 +135,18 @@ Entry CreateEntry(Class log_class, Level log_level, return std::move(entry); } +static Filter* filter; + +void SetFilter(Filter* new_filter) { + filter = new_filter; +} + void LogMessage(Class log_class, Level log_level, const char* filename, unsigned int line_nr, const char* function, const char* format, ...) { + if (!filter->CheckMessage(log_class, log_level)) + return; + va_list args; va_start(args, format); Entry entry = CreateEntry(log_class, log_level, |