diff options
Diffstat (limited to 'src/common/logging')
| -rw-r--r-- | src/common/logging/backend.cpp | 2 | ||||
| -rw-r--r-- | src/common/logging/backend.h | 2 | ||||
| -rw-r--r-- | src/common/logging/filter.cpp | 5 | ||||
| -rw-r--r-- | src/common/logging/filter.h | 2 |
4 files changed, 6 insertions, 5 deletions
diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp index 1323f8d0f..efd776db6 100644 --- a/src/common/logging/backend.cpp +++ b/src/common/logging/backend.cpp | |||
| @@ -135,7 +135,7 @@ FileBackend::FileBackend(const std::string& filename) | |||
| 135 | void FileBackend::Write(const Entry& entry) { | 135 | void FileBackend::Write(const Entry& entry) { |
| 136 | // prevent logs from going over the maximum size (in case its spamming and the user doesn't | 136 | // prevent logs from going over the maximum size (in case its spamming and the user doesn't |
| 137 | // know) | 137 | // know) |
| 138 | constexpr size_t MAX_BYTES_WRITTEN = 50 * 1024L * 1024L; | 138 | constexpr std::size_t MAX_BYTES_WRITTEN = 50 * 1024L * 1024L; |
| 139 | if (!file.IsOpen() || bytes_written > MAX_BYTES_WRITTEN) { | 139 | if (!file.IsOpen() || bytes_written > MAX_BYTES_WRITTEN) { |
| 140 | return; | 140 | return; |
| 141 | } | 141 | } |
diff --git a/src/common/logging/backend.h b/src/common/logging/backend.h index b3f4b9cef..11edbf1b6 100644 --- a/src/common/logging/backend.h +++ b/src/common/logging/backend.h | |||
| @@ -100,7 +100,7 @@ public: | |||
| 100 | 100 | ||
| 101 | private: | 101 | private: |
| 102 | FileUtil::IOFile file; | 102 | FileUtil::IOFile file; |
| 103 | size_t bytes_written; | 103 | std::size_t bytes_written; |
| 104 | }; | 104 | }; |
| 105 | 105 | ||
| 106 | void AddBackend(std::unique_ptr<Backend> backend); | 106 | void AddBackend(std::unique_ptr<Backend> backend); |
diff --git a/src/common/logging/filter.cpp b/src/common/logging/filter.cpp index 2dd331152..2eccbcd8d 100644 --- a/src/common/logging/filter.cpp +++ b/src/common/logging/filter.cpp | |||
| @@ -71,7 +71,7 @@ void Filter::ResetAll(Level level) { | |||
| 71 | } | 71 | } |
| 72 | 72 | ||
| 73 | void Filter::SetClassLevel(Class log_class, Level level) { | 73 | void Filter::SetClassLevel(Class log_class, Level level) { |
| 74 | class_levels[static_cast<size_t>(log_class)] = level; | 74 | class_levels[static_cast<std::size_t>(log_class)] = level; |
| 75 | } | 75 | } |
| 76 | 76 | ||
| 77 | void Filter::ParseFilterString(std::string_view filter_view) { | 77 | void Filter::ParseFilterString(std::string_view filter_view) { |
| @@ -93,7 +93,8 @@ void Filter::ParseFilterString(std::string_view filter_view) { | |||
| 93 | } | 93 | } |
| 94 | 94 | ||
| 95 | bool Filter::CheckMessage(Class log_class, Level level) const { | 95 | bool Filter::CheckMessage(Class log_class, Level level) const { |
| 96 | return static_cast<u8>(level) >= static_cast<u8>(class_levels[static_cast<size_t>(log_class)]); | 96 | return static_cast<u8>(level) >= |
| 97 | static_cast<u8>(class_levels[static_cast<std::size_t>(log_class)]); | ||
| 97 | } | 98 | } |
| 98 | 99 | ||
| 99 | bool Filter::IsDebug() const { | 100 | bool Filter::IsDebug() const { |
diff --git a/src/common/logging/filter.h b/src/common/logging/filter.h index f7e3b87c9..773df6f2c 100644 --- a/src/common/logging/filter.h +++ b/src/common/logging/filter.h | |||
| @@ -49,6 +49,6 @@ public: | |||
| 49 | bool IsDebug() const; | 49 | bool IsDebug() const; |
| 50 | 50 | ||
| 51 | private: | 51 | private: |
| 52 | std::array<Level, static_cast<size_t>(Class::Count)> class_levels; | 52 | std::array<Level, static_cast<std::size_t>(Class::Count)> class_levels; |
| 53 | }; | 53 | }; |
| 54 | } // namespace Log | 54 | } // namespace Log |