diff options
| author | 2021-04-14 21:29:44 -0700 | |
|---|---|---|
| committer | 2021-04-14 21:29:44 -0700 | |
| commit | 60511976bb721415180854a400571433f33e9abe (patch) | |
| tree | dbe65815775e1e9f0179746ef04ce52d893cd667 /src | |
| parent | Merge pull request #6196 from bunnei/asserts-setting (diff) | |
| parent | log/backend: Correct order of const in copy constructor (diff) | |
| download | yuzu-60511976bb721415180854a400571433f33e9abe.tar.gz yuzu-60511976bb721415180854a400571433f33e9abe.tar.xz yuzu-60511976bb721415180854a400571433f33e9abe.zip | |
Merge pull request #6199 from lioncash/log-ns
common/log: Move Log namespace into the Common namespace
Diffstat (limited to 'src')
| -rw-r--r-- | src/common/logging/backend.cpp | 25 | ||||
| -rw-r--r-- | src/common/logging/backend.h | 4 | ||||
| -rw-r--r-- | src/common/logging/filter.cpp | 4 | ||||
| -rw-r--r-- | src/common/logging/filter.h | 4 | ||||
| -rw-r--r-- | src/common/logging/log.h | 34 | ||||
| -rw-r--r-- | src/common/logging/text_formatter.cpp | 4 | ||||
| -rw-r--r-- | src/common/logging/text_formatter.h | 4 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_debug.cpp | 4 | ||||
| -rw-r--r-- | src/yuzu/debugger/console.cpp | 8 | ||||
| -rw-r--r-- | src/yuzu/main.cpp | 6 | ||||
| -rw-r--r-- | src/yuzu_cmd/yuzu.cpp | 6 |
11 files changed, 58 insertions, 45 deletions
diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp index 90ee4f33f..bc82905c0 100644 --- a/src/common/logging/backend.cpp +++ b/src/common/logging/backend.cpp | |||
| @@ -25,7 +25,7 @@ | |||
| 25 | #include "common/string_util.h" | 25 | #include "common/string_util.h" |
| 26 | #include "common/threadsafe_queue.h" | 26 | #include "common/threadsafe_queue.h" |
| 27 | 27 | ||
| 28 | namespace Log { | 28 | namespace Common::Log { |
| 29 | 29 | ||
| 30 | /** | 30 | /** |
| 31 | * Static state as a singleton. | 31 | * Static state as a singleton. |
| @@ -37,8 +37,11 @@ public: | |||
| 37 | return backend; | 37 | return backend; |
| 38 | } | 38 | } |
| 39 | 39 | ||
| 40 | Impl(Impl const&) = delete; | 40 | Impl(const Impl&) = delete; |
| 41 | const Impl& operator=(Impl const&) = delete; | 41 | Impl& operator=(const Impl&) = delete; |
| 42 | |||
| 43 | Impl(Impl&&) = delete; | ||
| 44 | Impl& operator=(Impl&&) = delete; | ||
| 42 | 45 | ||
| 43 | void PushEntry(Class log_class, Level log_level, const char* filename, unsigned int line_num, | 46 | void PushEntry(Class log_class, Level log_level, const char* filename, unsigned int line_num, |
| 44 | const char* function, std::string message) { | 47 | const char* function, std::string message) { |
| @@ -132,7 +135,7 @@ private: | |||
| 132 | std::mutex writing_mutex; | 135 | std::mutex writing_mutex; |
| 133 | std::thread backend_thread; | 136 | std::thread backend_thread; |
| 134 | std::vector<std::unique_ptr<Backend>> backends; | 137 | std::vector<std::unique_ptr<Backend>> backends; |
| 135 | Common::MPSCQueue<Log::Entry> message_queue; | 138 | MPSCQueue<Entry> message_queue; |
| 136 | Filter filter; | 139 | Filter filter; |
| 137 | std::chrono::steady_clock::time_point time_origin{std::chrono::steady_clock::now()}; | 140 | std::chrono::steady_clock::time_point time_origin{std::chrono::steady_clock::now()}; |
| 138 | }; | 141 | }; |
| @@ -146,16 +149,16 @@ void ColorConsoleBackend::Write(const Entry& entry) { | |||
| 146 | } | 149 | } |
| 147 | 150 | ||
| 148 | FileBackend::FileBackend(const std::string& filename) : bytes_written(0) { | 151 | FileBackend::FileBackend(const std::string& filename) : bytes_written(0) { |
| 149 | if (Common::FS::Exists(filename + ".old.txt")) { | 152 | if (FS::Exists(filename + ".old.txt")) { |
| 150 | Common::FS::Delete(filename + ".old.txt"); | 153 | FS::Delete(filename + ".old.txt"); |
| 151 | } | 154 | } |
| 152 | if (Common::FS::Exists(filename)) { | 155 | if (FS::Exists(filename)) { |
| 153 | Common::FS::Rename(filename, filename + ".old.txt"); | 156 | FS::Rename(filename, filename + ".old.txt"); |
| 154 | } | 157 | } |
| 155 | 158 | ||
| 156 | // _SH_DENYWR allows read only access to the file for other programs. | 159 | // _SH_DENYWR allows read only access to the file for other programs. |
| 157 | // It is #defined to 0 on other platforms | 160 | // It is #defined to 0 on other platforms |
| 158 | file = Common::FS::IOFile(filename, "w", _SH_DENYWR); | 161 | file = FS::IOFile(filename, "w", _SH_DENYWR); |
| 159 | } | 162 | } |
| 160 | 163 | ||
| 161 | void FileBackend::Write(const Entry& entry) { | 164 | void FileBackend::Write(const Entry& entry) { |
| @@ -182,7 +185,7 @@ void FileBackend::Write(const Entry& entry) { | |||
| 182 | 185 | ||
| 183 | void DebuggerBackend::Write(const Entry& entry) { | 186 | void DebuggerBackend::Write(const Entry& entry) { |
| 184 | #ifdef _WIN32 | 187 | #ifdef _WIN32 |
| 185 | ::OutputDebugStringW(Common::UTF8ToUTF16W(FormatLogMessage(entry).append(1, '\n')).c_str()); | 188 | ::OutputDebugStringW(UTF8ToUTF16W(FormatLogMessage(entry).append(1, '\n')).c_str()); |
| 186 | #endif | 189 | #endif |
| 187 | } | 190 | } |
| 188 | 191 | ||
| @@ -342,4 +345,4 @@ void FmtLogMessageImpl(Class log_class, Level log_level, const char* filename, | |||
| 342 | instance.PushEntry(log_class, log_level, filename, line_num, function, | 345 | instance.PushEntry(log_class, log_level, filename, line_num, function, |
| 343 | fmt::vformat(format, args)); | 346 | fmt::vformat(format, args)); |
| 344 | } | 347 | } |
| 345 | } // namespace Log | 348 | } // namespace Common::Log |
diff --git a/src/common/logging/backend.h b/src/common/logging/backend.h index da1c2f185..84a544ea4 100644 --- a/src/common/logging/backend.h +++ b/src/common/logging/backend.h | |||
| @@ -11,7 +11,7 @@ | |||
| 11 | #include "common/logging/filter.h" | 11 | #include "common/logging/filter.h" |
| 12 | #include "common/logging/log.h" | 12 | #include "common/logging/log.h" |
| 13 | 13 | ||
| 14 | namespace Log { | 14 | namespace Common::Log { |
| 15 | 15 | ||
| 16 | class Filter; | 16 | class Filter; |
| 17 | 17 | ||
| @@ -135,4 +135,4 @@ const char* GetLevelName(Level log_level); | |||
| 135 | * never get the message | 135 | * never get the message |
| 136 | */ | 136 | */ |
| 137 | void SetGlobalFilter(const Filter& filter); | 137 | void SetGlobalFilter(const Filter& filter); |
| 138 | } // namespace Log \ No newline at end of file | 138 | } // namespace Common::Log \ No newline at end of file |
diff --git a/src/common/logging/filter.cpp b/src/common/logging/filter.cpp index 2eccbcd8d..20a2dd106 100644 --- a/src/common/logging/filter.cpp +++ b/src/common/logging/filter.cpp | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | #include "common/logging/filter.h" | 7 | #include "common/logging/filter.h" |
| 8 | #include "common/string_util.h" | 8 | #include "common/string_util.h" |
| 9 | 9 | ||
| 10 | namespace Log { | 10 | namespace Common::Log { |
| 11 | namespace { | 11 | namespace { |
| 12 | template <typename It> | 12 | template <typename It> |
| 13 | Level GetLevelByName(const It begin, const It end) { | 13 | Level GetLevelByName(const It begin, const It end) { |
| @@ -103,4 +103,4 @@ bool Filter::IsDebug() const { | |||
| 103 | }); | 103 | }); |
| 104 | } | 104 | } |
| 105 | 105 | ||
| 106 | } // namespace Log | 106 | } // namespace Common::Log |
diff --git a/src/common/logging/filter.h b/src/common/logging/filter.h index 773df6f2c..f5673a9f6 100644 --- a/src/common/logging/filter.h +++ b/src/common/logging/filter.h | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | #include <string_view> | 9 | #include <string_view> |
| 10 | #include "common/logging/log.h" | 10 | #include "common/logging/log.h" |
| 11 | 11 | ||
| 12 | namespace Log { | 12 | namespace Common::Log { |
| 13 | 13 | ||
| 14 | /** | 14 | /** |
| 15 | * Implements a log message filter which allows different log classes to have different minimum | 15 | * Implements a log message filter which allows different log classes to have different minimum |
| @@ -51,4 +51,4 @@ public: | |||
| 51 | private: | 51 | private: |
| 52 | std::array<Level, static_cast<std::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 Common::Log |
diff --git a/src/common/logging/log.h b/src/common/logging/log.h index 3d7b7dab7..1f0f8db52 100644 --- a/src/common/logging/log.h +++ b/src/common/logging/log.h | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | #include <fmt/format.h> | 7 | #include <fmt/format.h> |
| 8 | #include "common/common_types.h" | 8 | #include "common/common_types.h" |
| 9 | 9 | ||
| 10 | namespace Log { | 10 | namespace Common::Log { |
| 11 | 11 | ||
| 12 | // trims up to and including the last of ../, ..\, src/, src\ in a string | 12 | // trims up to and including the last of ../, ..\, src/, src\ in a string |
| 13 | constexpr const char* TrimSourcePath(std::string_view source) { | 13 | constexpr const char* TrimSourcePath(std::string_view source) { |
| @@ -148,28 +148,34 @@ void FmtLogMessage(Class log_class, Level log_level, const char* filename, unsig | |||
| 148 | fmt::make_format_args(args...)); | 148 | fmt::make_format_args(args...)); |
| 149 | } | 149 | } |
| 150 | 150 | ||
| 151 | } // namespace Log | 151 | } // namespace Common::Log |
| 152 | 152 | ||
| 153 | #ifdef _DEBUG | 153 | #ifdef _DEBUG |
| 154 | #define LOG_TRACE(log_class, ...) \ | 154 | #define LOG_TRACE(log_class, ...) \ |
| 155 | ::Log::FmtLogMessage(::Log::Class::log_class, ::Log::Level::Trace, \ | 155 | Common::Log::FmtLogMessage(Common::Log::Class::log_class, Common::Log::Level::Trace, \ |
| 156 | ::Log::TrimSourcePath(__FILE__), __LINE__, __func__, __VA_ARGS__) | 156 | Common::Log::TrimSourcePath(__FILE__), __LINE__, __func__, \ |
| 157 | __VA_ARGS__) | ||
| 157 | #else | 158 | #else |
| 158 | #define LOG_TRACE(log_class, fmt, ...) (void(0)) | 159 | #define LOG_TRACE(log_class, fmt, ...) (void(0)) |
| 159 | #endif | 160 | #endif |
| 160 | 161 | ||
| 161 | #define LOG_DEBUG(log_class, ...) \ | 162 | #define LOG_DEBUG(log_class, ...) \ |
| 162 | ::Log::FmtLogMessage(::Log::Class::log_class, ::Log::Level::Debug, \ | 163 | Common::Log::FmtLogMessage(Common::Log::Class::log_class, Common::Log::Level::Debug, \ |
| 163 | ::Log::TrimSourcePath(__FILE__), __LINE__, __func__, __VA_ARGS__) | 164 | Common::Log::TrimSourcePath(__FILE__), __LINE__, __func__, \ |
| 165 | __VA_ARGS__) | ||
| 164 | #define LOG_INFO(log_class, ...) \ | 166 | #define LOG_INFO(log_class, ...) \ |
| 165 | ::Log::FmtLogMessage(::Log::Class::log_class, ::Log::Level::Info, \ | 167 | Common::Log::FmtLogMessage(Common::Log::Class::log_class, Common::Log::Level::Info, \ |
| 166 | ::Log::TrimSourcePath(__FILE__), __LINE__, __func__, __VA_ARGS__) | 168 | Common::Log::TrimSourcePath(__FILE__), __LINE__, __func__, \ |
| 169 | __VA_ARGS__) | ||
| 167 | #define LOG_WARNING(log_class, ...) \ | 170 | #define LOG_WARNING(log_class, ...) \ |
| 168 | ::Log::FmtLogMessage(::Log::Class::log_class, ::Log::Level::Warning, \ | 171 | Common::Log::FmtLogMessage(Common::Log::Class::log_class, Common::Log::Level::Warning, \ |
| 169 | ::Log::TrimSourcePath(__FILE__), __LINE__, __func__, __VA_ARGS__) | 172 | Common::Log::TrimSourcePath(__FILE__), __LINE__, __func__, \ |
| 173 | __VA_ARGS__) | ||
| 170 | #define LOG_ERROR(log_class, ...) \ | 174 | #define LOG_ERROR(log_class, ...) \ |
| 171 | ::Log::FmtLogMessage(::Log::Class::log_class, ::Log::Level::Error, \ | 175 | Common::Log::FmtLogMessage(Common::Log::Class::log_class, Common::Log::Level::Error, \ |
| 172 | ::Log::TrimSourcePath(__FILE__), __LINE__, __func__, __VA_ARGS__) | 176 | Common::Log::TrimSourcePath(__FILE__), __LINE__, __func__, \ |
| 177 | __VA_ARGS__) | ||
| 173 | #define LOG_CRITICAL(log_class, ...) \ | 178 | #define LOG_CRITICAL(log_class, ...) \ |
| 174 | ::Log::FmtLogMessage(::Log::Class::log_class, ::Log::Level::Critical, \ | 179 | Common::Log::FmtLogMessage(Common::Log::Class::log_class, Common::Log::Level::Critical, \ |
| 175 | ::Log::TrimSourcePath(__FILE__), __LINE__, __func__, __VA_ARGS__) | 180 | Common::Log::TrimSourcePath(__FILE__), __LINE__, __func__, \ |
| 181 | __VA_ARGS__) | ||
diff --git a/src/common/logging/text_formatter.cpp b/src/common/logging/text_formatter.cpp index 6a0605c63..80ee2cca1 100644 --- a/src/common/logging/text_formatter.cpp +++ b/src/common/logging/text_formatter.cpp | |||
| @@ -16,7 +16,7 @@ | |||
| 16 | #include "common/logging/text_formatter.h" | 16 | #include "common/logging/text_formatter.h" |
| 17 | #include "common/string_util.h" | 17 | #include "common/string_util.h" |
| 18 | 18 | ||
| 19 | namespace Log { | 19 | namespace Common::Log { |
| 20 | 20 | ||
| 21 | std::string FormatLogMessage(const Entry& entry) { | 21 | std::string FormatLogMessage(const Entry& entry) { |
| 22 | unsigned int time_seconds = static_cast<unsigned int>(entry.timestamp.count() / 1000000); | 22 | unsigned int time_seconds = static_cast<unsigned int>(entry.timestamp.count() / 1000000); |
| @@ -108,4 +108,4 @@ void PrintColoredMessage(const Entry& entry) { | |||
| 108 | #undef ESC | 108 | #undef ESC |
| 109 | #endif | 109 | #endif |
| 110 | } | 110 | } |
| 111 | } // namespace Log | 111 | } // namespace Common::Log |
diff --git a/src/common/logging/text_formatter.h b/src/common/logging/text_formatter.h index b6d9e57c8..171e74cfe 100644 --- a/src/common/logging/text_formatter.h +++ b/src/common/logging/text_formatter.h | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | #include <cstddef> | 7 | #include <cstddef> |
| 8 | #include <string> | 8 | #include <string> |
| 9 | 9 | ||
| 10 | namespace Log { | 10 | namespace Common::Log { |
| 11 | 11 | ||
| 12 | struct Entry; | 12 | struct Entry; |
| 13 | 13 | ||
| @@ -17,4 +17,4 @@ std::string FormatLogMessage(const Entry& entry); | |||
| 17 | void PrintMessage(const Entry& entry); | 17 | void PrintMessage(const Entry& entry); |
| 18 | /// Prints the same message as `PrintMessage`, but colored according to the severity level. | 18 | /// Prints the same message as `PrintMessage`, but colored according to the severity level. |
| 19 | void PrintColoredMessage(const Entry& entry); | 19 | void PrintColoredMessage(const Entry& entry); |
| 20 | } // namespace Log | 20 | } // namespace Common::Log |
diff --git a/src/yuzu/configuration/configure_debug.cpp b/src/yuzu/configuration/configure_debug.cpp index ac8bd4019..6730eb356 100644 --- a/src/yuzu/configuration/configure_debug.cpp +++ b/src/yuzu/configuration/configure_debug.cpp | |||
| @@ -55,9 +55,9 @@ void ConfigureDebug::ApplyConfiguration() { | |||
| 55 | Settings::values.disable_macro_jit = ui->disable_macro_jit->isChecked(); | 55 | Settings::values.disable_macro_jit = ui->disable_macro_jit->isChecked(); |
| 56 | Settings::values.extended_logging = ui->extended_logging->isChecked(); | 56 | Settings::values.extended_logging = ui->extended_logging->isChecked(); |
| 57 | Debugger::ToggleConsole(); | 57 | Debugger::ToggleConsole(); |
| 58 | Log::Filter filter; | 58 | Common::Log::Filter filter; |
| 59 | filter.ParseFilterString(Settings::values.log_filter); | 59 | filter.ParseFilterString(Settings::values.log_filter); |
| 60 | Log::SetGlobalFilter(filter); | 60 | Common::Log::SetGlobalFilter(filter); |
| 61 | } | 61 | } |
| 62 | 62 | ||
| 63 | void ConfigureDebug::changeEvent(QEvent* event) { | 63 | void ConfigureDebug::changeEvent(QEvent* event) { |
diff --git a/src/yuzu/debugger/console.cpp b/src/yuzu/debugger/console.cpp index 207ff4d58..c11a326ac 100644 --- a/src/yuzu/debugger/console.cpp +++ b/src/yuzu/debugger/console.cpp | |||
| @@ -29,13 +29,13 @@ void ToggleConsole() { | |||
| 29 | freopen_s(&temp, "CONIN$", "r", stdin); | 29 | freopen_s(&temp, "CONIN$", "r", stdin); |
| 30 | freopen_s(&temp, "CONOUT$", "w", stdout); | 30 | freopen_s(&temp, "CONOUT$", "w", stdout); |
| 31 | freopen_s(&temp, "CONOUT$", "w", stderr); | 31 | freopen_s(&temp, "CONOUT$", "w", stderr); |
| 32 | Log::AddBackend(std::make_unique<Log::ColorConsoleBackend>()); | 32 | Common::Log::AddBackend(std::make_unique<Common::Log::ColorConsoleBackend>()); |
| 33 | } | 33 | } |
| 34 | } else { | 34 | } else { |
| 35 | if (FreeConsole()) { | 35 | if (FreeConsole()) { |
| 36 | // In order to close the console, we have to also detach the streams on it. | 36 | // In order to close the console, we have to also detach the streams on it. |
| 37 | // Just redirect them to NUL if there is no console window | 37 | // Just redirect them to NUL if there is no console window |
| 38 | Log::RemoveBackend(Log::ColorConsoleBackend::Name()); | 38 | Common::Log::RemoveBackend(Common::Log::ColorConsoleBackend::Name()); |
| 39 | freopen_s(&temp, "NUL", "r", stdin); | 39 | freopen_s(&temp, "NUL", "r", stdin); |
| 40 | freopen_s(&temp, "NUL", "w", stdout); | 40 | freopen_s(&temp, "NUL", "w", stdout); |
| 41 | freopen_s(&temp, "NUL", "w", stderr); | 41 | freopen_s(&temp, "NUL", "w", stderr); |
| @@ -43,9 +43,9 @@ void ToggleConsole() { | |||
| 43 | } | 43 | } |
| 44 | #else | 44 | #else |
| 45 | if (UISettings::values.show_console) { | 45 | if (UISettings::values.show_console) { |
| 46 | Log::AddBackend(std::make_unique<Log::ColorConsoleBackend>()); | 46 | Common::Log::AddBackend(std::make_unique<Common::Log::ColorConsoleBackend>()); |
| 47 | } else { | 47 | } else { |
| 48 | Log::RemoveBackend(Log::ColorConsoleBackend::Name()); | 48 | Common::Log::RemoveBackend(Common::Log::ColorConsoleBackend::Name()); |
| 49 | } | 49 | } |
| 50 | #endif | 50 | #endif |
| 51 | } | 51 | } |
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 0822b1d11..fbf96be03 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp | |||
| @@ -171,12 +171,14 @@ void GMainWindow::ShowTelemetryCallout() { | |||
| 171 | const int GMainWindow::max_recent_files_item; | 171 | const int GMainWindow::max_recent_files_item; |
| 172 | 172 | ||
| 173 | static void InitializeLogging() { | 173 | static void InitializeLogging() { |
| 174 | using namespace Common; | ||
| 175 | |||
| 174 | Log::Filter log_filter; | 176 | Log::Filter log_filter; |
| 175 | log_filter.ParseFilterString(Settings::values.log_filter); | 177 | log_filter.ParseFilterString(Settings::values.log_filter); |
| 176 | Log::SetGlobalFilter(log_filter); | 178 | Log::SetGlobalFilter(log_filter); |
| 177 | 179 | ||
| 178 | const std::string& log_dir = Common::FS::GetUserPath(Common::FS::UserPath::LogDir); | 180 | const std::string& log_dir = FS::GetUserPath(FS::UserPath::LogDir); |
| 179 | Common::FS::CreateFullPath(log_dir); | 181 | FS::CreateFullPath(log_dir); |
| 180 | Log::AddBackend(std::make_unique<Log::FileBackend>(log_dir + LOG_FILE)); | 182 | Log::AddBackend(std::make_unique<Log::FileBackend>(log_dir + LOG_FILE)); |
| 181 | #ifdef _WIN32 | 183 | #ifdef _WIN32 |
| 182 | Log::AddBackend(std::make_unique<Log::DebuggerBackend>()); | 184 | Log::AddBackend(std::make_unique<Log::DebuggerBackend>()); |
diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp index b431db659..4871ac3bb 100644 --- a/src/yuzu_cmd/yuzu.cpp +++ b/src/yuzu_cmd/yuzu.cpp | |||
| @@ -74,14 +74,16 @@ static void PrintVersion() { | |||
| 74 | } | 74 | } |
| 75 | 75 | ||
| 76 | static void InitializeLogging() { | 76 | static void InitializeLogging() { |
| 77 | using namespace Common; | ||
| 78 | |||
| 77 | Log::Filter log_filter(Log::Level::Debug); | 79 | Log::Filter log_filter(Log::Level::Debug); |
| 78 | log_filter.ParseFilterString(Settings::values.log_filter); | 80 | log_filter.ParseFilterString(Settings::values.log_filter); |
| 79 | Log::SetGlobalFilter(log_filter); | 81 | Log::SetGlobalFilter(log_filter); |
| 80 | 82 | ||
| 81 | Log::AddBackend(std::make_unique<Log::ColorConsoleBackend>()); | 83 | Log::AddBackend(std::make_unique<Log::ColorConsoleBackend>()); |
| 82 | 84 | ||
| 83 | const std::string& log_dir = Common::FS::GetUserPath(Common::FS::UserPath::LogDir); | 85 | const std::string& log_dir = FS::GetUserPath(FS::UserPath::LogDir); |
| 84 | Common::FS::CreateFullPath(log_dir); | 86 | FS::CreateFullPath(log_dir); |
| 85 | Log::AddBackend(std::make_unique<Log::FileBackend>(log_dir + LOG_FILE)); | 87 | Log::AddBackend(std::make_unique<Log::FileBackend>(log_dir + LOG_FILE)); |
| 86 | #ifdef _WIN32 | 88 | #ifdef _WIN32 |
| 87 | Log::AddBackend(std::make_unique<Log::DebuggerBackend>()); | 89 | Log::AddBackend(std::make_unique<Log::DebuggerBackend>()); |