]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Process review comments 11693/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 21 Jun 2022 13:19:29 +0000 (15:19 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 21 Jun 2022 13:19:29 +0000 (15:19 +0200)
pdns/webserver.cc
pdns/ws-recursor.cc

index 7dfd5678214e30761f7fe48e79f964b1d70df554..78039890106cbf226b75b406215ca2504f5b1fe9 100644 (file)
@@ -167,7 +167,7 @@ void WebServer::apiWrapper(const WebServer::HandlerFunction& handler, HttpReques
 
   if (!d_apikey) {
     SLOG(g_log<<Logger::Error<<req->logprefix<<"HTTP API Request \"" << req->url.path << "\": Authentication failed, API Key missing in config" << endl,
-         d_slog->info(Logr::Error, "HTTP API Request: Authentication failed, API Key missing in config", "urlpath", Logging::Loggable(req->url.path)));
+         d_slog->info(Logr::Error, "Authentication failed, API Key missing in config", "urlpath", Logging::Loggable(req->url.path)));
     throw HttpUnauthorizedException("X-API-Key");
   }
 
@@ -183,7 +183,7 @@ void WebServer::apiWrapper(const WebServer::HandlerFunction& handler, HttpReques
 
   if (!auth_ok) {
     SLOG(g_log<<Logger::Error<<req->logprefix<<"HTTP Request \"" << req->url.path << "\": Authentication by API Key failed" << endl,
-         d_slog->info(Logr::Error, "HTTP Request: Authentication by API Key failed", "urlpath", Logging::Loggable(req->url.path)));
+         d_slog->info(Logr::Error, "Authentication by API Key failed", "urlpath", Logging::Loggable(req->url.path)));
     throw HttpUnauthorizedException("X-API-Key");
   }
 
@@ -498,6 +498,7 @@ void WebServer::serveConnection(const std::shared_ptr<Socket>& client) const {
            d_slog->error(Logr::Warning, e.what(), "Unable to parse request"));
     }
 
+    // Uses of `remote` below guarded by d_loglevel
     if (d_loglevel > WebServer::LogLevel::None) {
       client->getRemote(remote);
     }
index db66ea295fd85650f340a8429e97a050a8db8321..16b6a195fcd85ec830f436c916f20b1888f06cc2 100644 (file)
@@ -1163,7 +1163,7 @@ static void validatePrometheusMetrics()
 
     if (!s_metricDefinitions.getMetricDetails(metricName, metricDetails)) {
       SLOG(g_log << Logger::Debug << "{ \"" << metricName << "\", MetricDefinition(PrometheusMetricType::counter, \"\")}," << endl,
-           g_slog->ingo(Logr::Debug, "{ \"" << metricName << "\", MetricDefinition(PrometheusMetricType::counter, \"\")},"));
+           g_slog->info(Logr::Debug, "{ \"" << metricName << "\", MetricDefinition(PrometheusMetricType::counter, \"\")},"));
     }
   }
 }