Skip to content

Commit

Permalink
Merge pull request ClickHouse#71090 from ClickHouse/lower-log-levels
Browse files Browse the repository at this point in the history
Lower log levels in S3
  • Loading branch information
alexey-milovidov authored Oct 27, 2024
2 parents cde4d07 + 78d104c commit 0cbf3c3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/IO/S3/AWSLogger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ const char * S3_LOGGER_TAG_NAMES[][2] = {

const std::pair<DB::LogsLevel, Poco::Message::Priority> & convertLogLevel(Aws::Utils::Logging::LogLevel log_level)
{
/// We map levels to our own logger 1 to 1 except WARN+ levels. In most cases we failover such errors with retries
/// We map levels to our own logger 1 to 1 except INFO+ levels. In most cases we fail over such errors with retries
/// and don't want to see them as Errors in our logs.
static const std::unordered_map<Aws::Utils::Logging::LogLevel, std::pair<DB::LogsLevel, Poco::Message::Priority>> mapping =
{
{Aws::Utils::Logging::LogLevel::Off, {DB::LogsLevel::none, Poco::Message::PRIO_INFORMATION}},
{Aws::Utils::Logging::LogLevel::Fatal, {DB::LogsLevel::information, Poco::Message::PRIO_INFORMATION}},
{Aws::Utils::Logging::LogLevel::Error, {DB::LogsLevel::information, Poco::Message::PRIO_INFORMATION}},
{Aws::Utils::Logging::LogLevel::Warn, {DB::LogsLevel::information, Poco::Message::PRIO_INFORMATION}},
{Aws::Utils::Logging::LogLevel::Info, {DB::LogsLevel::information, Poco::Message::PRIO_INFORMATION}},
{Aws::Utils::Logging::LogLevel::Info, {DB::LogsLevel::debug, Poco::Message::PRIO_DEBUG}},
{Aws::Utils::Logging::LogLevel::Debug, {DB::LogsLevel::debug, Poco::Message::PRIO_TEST}},
{Aws::Utils::Logging::LogLevel::Trace, {DB::LogsLevel::trace, Poco::Message::PRIO_TEST}},
};
Expand Down
6 changes: 3 additions & 3 deletions src/IO/S3/deleteFileFromS3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void deleteFileFromS3(

if (outcome.IsSuccess())
{
LOG_INFO(log, "Object with path {} was removed from S3", key);
LOG_DEBUG(log, "Object with path {} was removed from S3", key);
}
else if (if_exists && S3::isNotFoundError(outcome.GetError().GetErrorType()))
{
Expand Down Expand Up @@ -173,7 +173,7 @@ void deleteFilesFromS3(
if (errors.empty())
{
/// All the objects were removed.
LOG_INFO(log, "Objects with paths [{}] were removed from S3", comma_separated_keys);
LOG_DEBUG(log, "Objects with paths [{}] were removed from S3", comma_separated_keys);
}
else
{
Expand Down Expand Up @@ -210,7 +210,7 @@ void deleteFilesFromS3(
removed_keys_comma_separated += ", ";
removed_keys_comma_separated += key;
}
LOG_INFO(log, "Objects with paths [{}] were removed from S3", removed_keys_comma_separated);
LOG_DEBUG(log, "Objects with paths [{}] were removed from S3", removed_keys_comma_separated);
}

if (!not_found_keys.empty())
Expand Down

0 comments on commit 0cbf3c3

Please sign in to comment.