Skip to content

Commit 6ad86dc

Browse files
committed
Make information log less verbose
by moving some messages to notice.
1 parent 15ace45 commit 6ad86dc

7 files changed

+15
-15
lines changed

lib/icinga/checkable-notification.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ void Checkable::SendNotifications(NotificationType type, const CheckResult::Ptr&
5959
return;
6060
}
6161

62-
Log(LogInformation, "Checkable")
62+
Log(LogNotice, "Checkable")
6363
<< "Checkable '" << checkableName << "' has " << notifications.size()
6464
<< " notification(s). Checking filters for type '" << notificationTypeName << "', sends will be logged.";
6565

lib/icinga/notification.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ void Notification::BeginExecuteNotification(NotificationType type, const CheckRe
439439
}
440440
}
441441

442-
Log(LogInformation, "Notification")
442+
Log(LogNotice, "Notification")
443443
<< "Sending " << (reminder ? "reminder " : "") << "'" << NotificationTypeToString(type) << "' notification '"
444444
<< notificationName << "' for user '" << userName << "'";
445445

@@ -562,7 +562,7 @@ void Notification::ExecuteNotificationHelper(NotificationType type, const User::
562562
/* required by compatlogger */
563563
Service::OnNotificationSentToUser(this, GetCheckable(), user, type, cr, author, text, commandName, nullptr);
564564

565-
Log(LogInformation, "Notification")
565+
Log(LogNotice, "Notification")
566566
<< "Completed sending '" << NotificationTypeToString(type)
567567
<< "' notification '" << notificationName
568568
<< "' for checkable '" << checkableName

lib/remote/apilistener-configsync.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ void ApiListener::SendRuntimeConfigObjects(const JsonRpcConnection::Ptr& aclient
450450

451451
Zone::Ptr azone = endpoint->GetZone();
452452

453-
Log(LogInformation, "ApiListener")
453+
Log(LogNotice, "ApiListener")
454454
<< "Syncing runtime objects to endpoint '" << endpoint->GetName() << "'.";
455455

456456
for (const Type::Ptr& type : Type::GetAllTypes()) {
@@ -469,6 +469,6 @@ void ApiListener::SendRuntimeConfigObjects(const JsonRpcConnection::Ptr& aclient
469469
}
470470
}
471471

472-
Log(LogInformation, "ApiListener")
472+
Log(LogNotice, "ApiListener")
473473
<< "Finished syncing runtime objects to endpoint '" << endpoint->GetName() << "'.";
474474
}

lib/remote/apilistener-filesync.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ void ApiListener::SendConfigUpdate(const JsonRpcConnection::Ptr& aclient)
207207
if (!Utility::PathExists(zoneDir))
208208
continue;
209209

210-
Log(LogInformation, "ApiListener")
210+
Log(LogNotice, "ApiListener")
211211
<< "Syncing configuration files for " << (zone->IsGlobal() ? "global " : "")
212212
<< "zone '" << zoneName << "' to endpoint '" << endpoint->GetName() << "'.";
213213

lib/remote/apilistener.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -877,19 +877,19 @@ void ApiListener::SyncClient(const JsonRpcConnection::Ptr& aclient, const Endpoi
877877
* before the logs are replayed.
878878
*/
879879

880-
Log(LogInformation, "ApiListener")
880+
Log(LogNotice, "ApiListener")
881881
<< "Sending config updates for endpoint '" << endpoint->GetName() << "' in zone '" << eZone->GetName() << "'.";
882882

883883
/* sync zone file config */
884884
SendConfigUpdate(aclient);
885885

886-
Log(LogInformation, "ApiListener")
886+
Log(LogNotice, "ApiListener")
887887
<< "Finished sending config file updates for endpoint '" << endpoint->GetName() << "' in zone '" << eZone->GetName() << "'.";
888888

889889
/* sync runtime config */
890890
SendRuntimeConfigObjects(aclient);
891891

892-
Log(LogInformation, "ApiListener")
892+
Log(LogNotice, "ApiListener")
893893
<< "Finished sending runtime config updates for endpoint '" << endpoint->GetName() << "' in zone '" << eZone->GetName() << "'.";
894894

895895
if (!needSync) {
@@ -898,15 +898,15 @@ void ApiListener::SyncClient(const JsonRpcConnection::Ptr& aclient, const Endpoi
898898
return;
899899
}
900900

901-
Log(LogInformation, "ApiListener")
901+
Log(LogNotice, "ApiListener")
902902
<< "Sending replay log for endpoint '" << endpoint->GetName() << "' in zone '" << eZone->GetName() << "'.";
903903

904904
ReplayLog(aclient);
905905

906906
if (eZone == Zone::GetLocalZone())
907907
UpdateObjectAuthority();
908908

909-
Log(LogInformation, "ApiListener")
909+
Log(LogNotice, "ApiListener")
910910
<< "Finished sending replay log for endpoint '" << endpoint->GetName() << "' in zone '" << eZone->GetName() << "'.";
911911
} catch (const std::exception& ex) {
912912
{
@@ -921,7 +921,7 @@ void ApiListener::SyncClient(const JsonRpcConnection::Ptr& aclient, const Endpoi
921921
<< "Error while syncing endpoint '" << endpoint->GetName() << "': " << DiagnosticInformation(ex);
922922
}
923923

924-
Log(LogInformation, "ApiListener")
924+
Log(LogNotice, "ApiListener")
925925
<< "Finished syncing endpoint '" << endpoint->GetName() << "' in zone '" << eZone->GetName() << "'.";
926926
}
927927

lib/remote/endpoint.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ void Endpoint::RemoveClient(const JsonRpcConnection::Ptr& client)
6060
std::unique_lock<std::mutex> lock(m_ClientsLock);
6161
m_Clients.erase(client);
6262

63-
Log(LogWarning, "ApiListener")
63+
Log(LogNotice, "ApiListener")
6464
<< "Removing API client for endpoint '" << GetName() << "'. " << m_Clients.size() << " API clients left.";
6565

6666
SetConnecting(false);

lib/remote/jsonrpcconnection-pki.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Value RequestCertificateHandler(const MessageOrigin::Ptr& origin, const Dictiona
5656
bool signedByCA = false;
5757

5858
{
59-
Log logmsg(LogInformation, "JsonRpcConnection");
59+
Log logmsg(LogNotice, "JsonRpcConnection");
6060
logmsg << "Received certificate request for CN '" << cn << "'";
6161

6262
try {
@@ -79,7 +79,7 @@ Value RequestCertificateHandler(const MessageOrigin::Ptr& origin, const Dictiona
7979
if (signedByCA) {
8080
if (IsCertUptodate(cert)) {
8181

82-
Log(LogInformation, "JsonRpcConnection")
82+
Log(LogNotice, "JsonRpcConnection")
8383
<< "The certificate for CN '" << cn << "' is valid and uptodate. Skipping automated renewal.";
8484
result->Set("status_code", 1);
8585
result->Set("error", "The certificate for CN '" + cn + "' is valid and uptodate. Skipping automated renewal.");

0 commit comments

Comments
 (0)