diff options
author | Lioncash <mathew1800@gmail.com> | 2021-04-15 02:19:52 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2021-04-15 05:10:58 +0200 |
commit | 64606aefcf2407513d3687a1f8d325653bde1f72 (patch) | |
tree | e6d171bdaf94d121809cf8f27a00f417bda39f06 /src/common/logging/backend.cpp | |
parent | Merge pull request #6192 from lioncash/discard (diff) | |
download | yuzu-64606aefcf2407513d3687a1f8d325653bde1f72.tar yuzu-64606aefcf2407513d3687a1f8d325653bde1f72.tar.gz yuzu-64606aefcf2407513d3687a1f8d325653bde1f72.tar.bz2 yuzu-64606aefcf2407513d3687a1f8d325653bde1f72.tar.lz yuzu-64606aefcf2407513d3687a1f8d325653bde1f72.tar.xz yuzu-64606aefcf2407513d3687a1f8d325653bde1f72.tar.zst yuzu-64606aefcf2407513d3687a1f8d325653bde1f72.zip |
Diffstat (limited to '')
-rw-r--r-- | src/common/logging/backend.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp index 4575df24d..c06364977 100644 --- a/src/common/logging/backend.cpp +++ b/src/common/logging/backend.cpp @@ -25,7 +25,7 @@ #include "common/threadsafe_queue.h" #include "core/settings.h" -namespace Log { +namespace Common::Log { /** * Static state as a singleton. @@ -132,7 +132,7 @@ private: std::mutex writing_mutex; std::thread backend_thread; std::vector<std::unique_ptr<Backend>> backends; - Common::MPSCQueue<Log::Entry> message_queue; + MPSCQueue<Entry> message_queue; Filter filter; std::chrono::steady_clock::time_point time_origin{std::chrono::steady_clock::now()}; }; @@ -146,16 +146,16 @@ void ColorConsoleBackend::Write(const Entry& entry) { } FileBackend::FileBackend(const std::string& filename) : bytes_written(0) { - if (Common::FS::Exists(filename + ".old.txt")) { - Common::FS::Delete(filename + ".old.txt"); + if (FS::Exists(filename + ".old.txt")) { + FS::Delete(filename + ".old.txt"); } - if (Common::FS::Exists(filename)) { - Common::FS::Rename(filename, filename + ".old.txt"); + if (FS::Exists(filename)) { + FS::Rename(filename, filename + ".old.txt"); } // _SH_DENYWR allows read only access to the file for other programs. // It is #defined to 0 on other platforms - file = Common::FS::IOFile(filename, "w", _SH_DENYWR); + file = FS::IOFile(filename, "w", _SH_DENYWR); } void FileBackend::Write(const Entry& entry) { @@ -182,7 +182,7 @@ void FileBackend::Write(const Entry& entry) { void DebuggerBackend::Write(const Entry& entry) { #ifdef _WIN32 - ::OutputDebugStringW(Common::UTF8ToUTF16W(FormatLogMessage(entry).append(1, '\n')).c_str()); + ::OutputDebugStringW(UTF8ToUTF16W(FormatLogMessage(entry).append(1, '\n')).c_str()); #endif } @@ -342,4 +342,4 @@ void FmtLogMessageImpl(Class log_class, Level log_level, const char* filename, instance.PushEntry(log_class, log_level, filename, line_num, function, fmt::vformat(format, args)); } -} // namespace Log +} // namespace Common::Log |