diff options
| author | 2014-12-06 20:00:08 -0200 | |
|---|---|---|
| committer | 2014-12-13 02:08:06 -0200 | |
| commit | 0e0a007a2503d468391004c8ea2faae305232345 (patch) | |
| tree | 75feea527bd46aa4c534b77b560c89d538757f7f /src/citra/citra.cpp | |
| parent | Convert old logging calls to new logging macros (diff) | |
| download | yuzu-0e0a007a2503d468391004c8ea2faae305232345.tar.gz yuzu-0e0a007a2503d468391004c8ea2faae305232345.tar.xz yuzu-0e0a007a2503d468391004c8ea2faae305232345.zip | |
Add configurable per-class log filtering
Diffstat (limited to 'src/citra/citra.cpp')
| -rw-r--r-- | src/citra/citra.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/citra/citra.cpp b/src/citra/citra.cpp index d192428e9..d6e8a4ec7 100644 --- a/src/citra/citra.cpp +++ b/src/citra/citra.cpp | |||
| @@ -7,6 +7,7 @@ | |||
| 7 | #include "common/common.h" | 7 | #include "common/common.h" |
| 8 | #include "common/logging/text_formatter.h" | 8 | #include "common/logging/text_formatter.h" |
| 9 | #include "common/logging/backend.h" | 9 | #include "common/logging/backend.h" |
| 10 | #include "common/logging/filter.h" | ||
| 10 | #include "common/scope_exit.h" | 11 | #include "common/scope_exit.h" |
| 11 | 12 | ||
| 12 | #include "core/settings.h" | 13 | #include "core/settings.h" |
| @@ -20,7 +21,8 @@ | |||
| 20 | /// Application entry point | 21 | /// Application entry point |
| 21 | int __cdecl main(int argc, char **argv) { | 22 | int __cdecl main(int argc, char **argv) { |
| 22 | std::shared_ptr<Log::Logger> logger = Log::InitGlobalLogger(); | 23 | std::shared_ptr<Log::Logger> logger = Log::InitGlobalLogger(); |
| 23 | std::thread logging_thread(Log::TextLoggingLoop, logger); | 24 | Log::Filter log_filter(Log::Level::Debug); |
| 25 | std::thread logging_thread(Log::TextLoggingLoop, logger, &log_filter); | ||
| 24 | SCOPE_EXIT({ | 26 | SCOPE_EXIT({ |
| 25 | logger->Close(); | 27 | logger->Close(); |
| 26 | logging_thread.join(); | 28 | logging_thread.join(); |
| @@ -32,6 +34,7 @@ int __cdecl main(int argc, char **argv) { | |||
| 32 | } | 34 | } |
| 33 | 35 | ||
| 34 | Config config; | 36 | Config config; |
| 37 | log_filter.ParseFilterString(Settings::values.log_filter); | ||
| 35 | 38 | ||
| 36 | std::string boot_filename = argv[1]; | 39 | std::string boot_filename = argv[1]; |
| 37 | EmuWindow_GLFW* emu_window = new EmuWindow_GLFW; | 40 | EmuWindow_GLFW* emu_window = new EmuWindow_GLFW; |