diff options
| author | 2022-06-16 23:07:09 +0300 | |
|---|---|---|
| committer | 2022-06-16 23:39:50 +0300 | |
| commit | 9e384ed54b6ca7348d798177d7b17c514937766d (patch) | |
| tree | becc580b33947c1938b08d16308791e734d63bfe /src | |
| parent | Merge pull request #8473 from DCNick3/implement-exit-process (diff) | |
| download | yuzu-9e384ed54b6ca7348d798177d7b17c514937766d.tar.gz yuzu-9e384ed54b6ca7348d798177d7b17c514937766d.tar.xz yuzu-9e384ed54b6ca7348d798177d7b17c514937766d.zip | |
Make yuzu-cmd respect log_filter setting
Because logging infrastructure initializes before the loading of the
config, it reads the default setting for log_filter and ignores the one
set in config. To change log_filter after logging initialization some
additional calls need to be made.
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuzu_cmd/yuzu.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp index 0dce5e274..e840732e2 100644 --- a/src/yuzu_cmd/yuzu.cpp +++ b/src/yuzu_cmd/yuzu.cpp | |||
| @@ -138,6 +138,12 @@ int main(int argc, char** argv) { | |||
| 138 | 138 | ||
| 139 | Config config{config_path}; | 139 | Config config{config_path}; |
| 140 | 140 | ||
| 141 | // apply the log_filter setting | ||
| 142 | // the logger was initialized before and doesn't pick up the filter on its own | ||
| 143 | Common::Log::Filter filter; | ||
| 144 | filter.ParseFilterString(Settings::values.log_filter.GetValue()); | ||
| 145 | Common::Log::SetGlobalFilter(filter); | ||
| 146 | |||
| 141 | if (!program_args.empty()) { | 147 | if (!program_args.empty()) { |
| 142 | Settings::values.program_args = program_args; | 148 | Settings::values.program_args = program_args; |
| 143 | } | 149 | } |