Skip to content

Commit

Permalink
fix: allow specifying log level without having to specify log file (#775
Browse files Browse the repository at this point in the history
)
  • Loading branch information
gahtan-syarif authored Jan 14, 2025
1 parent 2068a82 commit 1a23f98
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions app/src/cli/cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,10 +364,8 @@ void parseAutoSaveInterval(const std::vector<std::string> &params, ArgumentData
}

void parseLog(const std::vector<std::string> &params, ArgumentData &argument_data) {
std::string filename;
parseDashOptions(params, [&](const std::string &key, const std::string &value) {
if (key == "file") {
filename = value;
argument_data.tournament_config.log.file = value;
} else if (key == "level") {
Logger::Level level = Logger::Level::WARN;
Expand Down Expand Up @@ -395,8 +393,6 @@ void parseLog(const std::vector<std::string> &params, ArgumentData &argument_dat
OptionsParser::throwMissing("log", key, value);
}
});

if (filename.empty()) throw std::runtime_error("Please specify filename for log output.");
}

namespace json_config {
Expand Down

0 comments on commit 1a23f98

Please sign in to comment.