Skip to content

Commit

Permalink
Merge branch 'master' into tstenner/outlet_sync
Browse files Browse the repository at this point in the history
  • Loading branch information
cboulay committed Dec 23, 2022
2 parents 3060b65 + 08aa186 commit 7e39ee6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/api_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,6 @@ void api_config::load_from_file(const std::string &filename) {
} else
loguru::g_stderr_verbosity = log_level;

// log config filename only after setting the verbosity level
if (!filename.empty())
LOG_F(INFO, "Configuration loaded from %s", filename.c_str());
else
LOG_F(INFO, "Loaded default config");

// read out the [ports] parameters
multicast_port_ = pt.get("ports.MulticastPort", 16571);
base_port_ = pt.get("ports.BasePort", 16572);
Expand Down Expand Up @@ -269,6 +263,12 @@ void api_config::load_from_file(const std::string &filename) {
smoothing_halftime_ = pt.get("tuning.SmoothingHalftime", 90.0F);
force_default_timestamps_ = pt.get("tuning.ForceDefaultTimestamps", false);

// log config filename only after setting the verbosity level and all config has been read
if (!filename.empty())
LOG_F(INFO, "Configuration loaded from %s", filename.c_str());
else
LOG_F(INFO, "Loaded default config");

} catch (std::exception &e) {
LOG_F(ERROR, "Error parsing config file '%s': '%s', rolling back to defaults",
filename.c_str(), e.what());
Expand Down

0 comments on commit 7e39ee6

Please sign in to comment.