mirror of
https://gitlab.com/suyu-emu/suyu.git
synced 2024-03-15 23:15:44 +00:00
Fix build and address review feedback
This commit is contained in:
parent
6269a01b4e
commit
76b475faf7
|
@ -65,14 +65,14 @@ bool Filter::ParseFilterRule(const std::string::const_iterator begin,
|
||||||
const std::string::const_iterator end) {
|
const std::string::const_iterator end) {
|
||||||
auto level_separator = std::find(begin, end, ':');
|
auto level_separator = std::find(begin, end, ':');
|
||||||
if (level_separator == end) {
|
if (level_separator == end) {
|
||||||
LOG_ERROR(Log, "Invalid log filter. Must specify a log level after `:`: %s",
|
LOG_ERROR(Log, "Invalid log filter. Must specify a log level after `:`: {}",
|
||||||
std::string(begin, end).c_str());
|
std::string(begin, end));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Level level = GetLevelByName(level_separator + 1, end);
|
const Level level = GetLevelByName(level_separator + 1, end);
|
||||||
if (level == Level::Count) {
|
if (level == Level::Count) {
|
||||||
LOG_ERROR(Log, "Unknown log level in filter: %s", std::string(begin, end).c_str());
|
LOG_ERROR(Log, "Unknown log level in filter: {}", std::string(begin, end));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ bool Filter::ParseFilterRule(const std::string::const_iterator begin,
|
||||||
|
|
||||||
const Class log_class = GetClassByName(begin, level_separator);
|
const Class log_class = GetClassByName(begin, level_separator);
|
||||||
if (log_class == Class::Count) {
|
if (log_class == Class::Count) {
|
||||||
LOG_ERROR(Log, "Unknown log class in filter: %s", std::string(begin, end).c_str());
|
LOG_ERROR(Log, "Unknown log class in filter: {}", std::string(begin, end));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
|
|
||||||
|
#include "common/common_paths.h"
|
||||||
#include "common/logging/backend.h"
|
#include "common/logging/backend.h"
|
||||||
#include "common/logging/filter.h"
|
#include "common/logging/filter.h"
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
|
|
Loading…
Reference in a new issue