]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[1897] Log HTTP messages through logging system
authorJelte Jansen <jelte@isc.org>
Tue, 22 Jan 2013 09:28:33 +0000 (10:28 +0100)
committerJelte Jansen <jelte@isc.org>
Tue, 22 Jan 2013 09:28:33 +0000 (10:28 +0100)
src/bin/stats/stats_httpd.py.in
src/bin/stats/stats_httpd_messages.mes

index 057b8cadc5f754c12919aef8599d1af47cdc448a..77361bd620a8a73abc12df1c1d5dcf93c5ee7675 100644 (file)
@@ -201,6 +201,14 @@ class HttpHandler(http.server.BaseHTTPRequestHandler):
             self.end_headers()
             return body
 
+    def log_message(self, format, *args):
+        """overrides the parent method log_message()
+        to use the bind10 logging framework.
+        """
+        logger.debug(DBG_STATHTTPD_MESSAGING, STATHTTPD_HTTPLOG,
+                     self.address_string(),
+                     format%args)
+
 class HttpServerError(Exception):
     """Exception class for HttpServer class. It is intended to be
     passed from the HttpServer object to the StatsHttpd object."""
index ad2e97f3875d1e65cbdd026e1219e7a55867ef53..cac3ace25dc976c55736c883754e6490e829b751 100644 (file)
@@ -96,3 +96,9 @@ configuration is unknown. The new configuration is ignored, and an
 error is sent back. As possible cause is that there was an upgrade
 problem, and the stats-httpd version is out of sync with the rest of
 the system.
+
+% STATHTTPD_HTTPLOG %1 %2
+Debug HTTP log message. These are the messages logged by the http server
+instance. For most logs, the message shows HTTP client and query
+information like HTTP method, URI, and status code, but the http server
+can also log other information, such as extended status reports.