Skip to content

Commit

Permalink
Code format - (Clang-format)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Aug 22, 2024
1 parent 70095d7 commit 328798f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/lib/logging/logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ std::string Logger::getLevel() const {
return std::string { level.begin(), level.end() };
}

void Logger::logProfile(const std::string& name, double duration_ms) const {
void Logger::logProfile(const std::string &name, double duration_ms) const {
std::string mutable_name = name;

std::ranges::replace(mutable_name, ':', '_');
Expand All @@ -89,15 +89,14 @@ void Logger::logProfile(const std::string& name, double duration_ms) const {
const auto profile_logger = std::make_shared<spdlog::logger>(mutable_name, file_sink);
profile_loggers_[filename] = profile_logger;
profile_logger->info("Function {} executed in {} ms", name, duration_ms);
} catch (const spdlog::spdlog_ex& ex) {
} catch (const spdlog::spdlog_ex &ex) {
error("Profile log initialization failed: {}", ex.what());
}
} else {
it->second->info("Function {} executed in {} ms", mutable_name, duration_ms);
}
}


// Função para limpar logs antigos
void Logger::cleanOldLogs(const std::string &logDirectory, int days) const {
namespace fs = std::filesystem;
Expand Down

0 comments on commit 328798f

Please sign in to comment.