Skip to content

Commit

Permalink
Decrease log level of some startup logs
Browse files Browse the repository at this point in the history
  • Loading branch information
sjanel committed Apr 22, 2023
1 parent 3b3c262 commit bbcef03
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/api-objects/src/apikeysprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ std::string_view GetSecretFileName(settings::RunMode runMode) {
APIKeysProvider::APIKeysProvider(std::string_view dataDir, const ExchangeSecretsInfo& exchangeSecretsInfo,
settings::RunMode runMode)
: _apiKeysMap(ParseAPIKeys(dataDir, exchangeSecretsInfo, runMode)) {
if (log::get_level() <= log::level::info) {
if (log::get_level() <= log::level::debug) {
string foundKeysStr = str();
if (!foundKeysStr.empty()) {
log::info("Loaded keys {}", foundKeysStr);
log::debug("Loaded keys {}", foundKeysStr);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/api/common/src/cryptowatchapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ CryptowatchAPI::CryptowatchAPI(const CoincenterInfo& config, settings::RunMode r
Fiats fiats;
fiats.reserve(static_cast<Fiats::size_type>(fiatsFile.size()));
for (json& val : fiatsFile) {
log::debug("Reading fiat {} from cache file", val.get<std::string_view>());
log::trace("Reading fiat {} from cache file", val.get<std::string_view>());
fiats.emplace_hint(fiats.end(), std::move(val.get_ref<string&>()));
}
log::info("Loaded {} fiats from cache file", fiats.size());
log::debug("Loaded {} fiats from cache file", fiats.size());
_fiatsCache.set(std::move(fiats), TimePoint(std::chrono::seconds(timeEpoch)));
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/monitoring/src/monitoringinfo.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "monitoringinfo.hpp"

#include "cct_exception.hpp"
#include "cct_invalid_argument_exception.hpp"
#include "cct_log.hpp"

namespace cct {
Expand All @@ -12,12 +12,12 @@ MonitoringInfo::MonitoringInfo(bool useMonitoring, std::string_view jobName, std
_password(password),
_port(useMonitoring ? static_cast<uint16_t>(port) : 0U) {
if (port < 0 || port > static_cast<int>(std::numeric_limits<uint16_t>::max())) {
throw exception("Invalid port value {}", port);
throw invalid_argument("Invalid port value {}", port);
}
if (useMonitoring) {
log::info("Monitoring config - Export to {}:{} user '{}', job name {}", address, port, username, jobName);
} else {
log::info("Monitoring disabled");
log::debug("Monitoring disabled");
}
}
} // namespace cct

0 comments on commit bbcef03

Please sign in to comment.