diff options
author | James Rowe <jroweboy@gmail.com> | 2018-07-14 20:47:14 +0200 |
---|---|---|
committer | James Rowe <jroweboy@gmail.com> | 2018-07-15 21:02:09 +0200 |
commit | 497b81558e2543f3b42e4267d8ea9acc40bdf03b (patch) | |
tree | 47654b29d6ddd302315de8ff5e0593ca8de9ef77 /src/common/logging/filter.cpp | |
parent | Logging: Don't lock the queue for the duration of the write (diff) | |
download | yuzu-497b81558e2543f3b42e4267d8ea9acc40bdf03b.tar yuzu-497b81558e2543f3b42e4267d8ea9acc40bdf03b.tar.gz yuzu-497b81558e2543f3b42e4267d8ea9acc40bdf03b.tar.bz2 yuzu-497b81558e2543f3b42e4267d8ea9acc40bdf03b.tar.lz yuzu-497b81558e2543f3b42e4267d8ea9acc40bdf03b.tar.xz yuzu-497b81558e2543f3b42e4267d8ea9acc40bdf03b.tar.zst yuzu-497b81558e2543f3b42e4267d8ea9acc40bdf03b.zip |
Diffstat (limited to 'src/common/logging/filter.cpp')
-rw-r--r-- | src/common/logging/filter.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/common/logging/filter.cpp b/src/common/logging/filter.cpp index 4e783a577..6ed087beb 100644 --- a/src/common/logging/filter.cpp +++ b/src/common/logging/filter.cpp @@ -94,4 +94,11 @@ bool Filter::ParseFilterRule(const std::string::const_iterator begin, bool Filter::CheckMessage(Class log_class, Level level) const { return static_cast<u8>(level) >= static_cast<u8>(class_levels[static_cast<size_t>(log_class)]); } + +bool Filter::IsDebug() const { + return std::any_of(class_levels.begin(), class_levels.end(), [](const Level& l) { + return static_cast<u8>(l) <= static_cast<u8>(Level::Debug); + }); +} + } // namespace Log |