feat: Suppress server logs and add server status to overlay

This commit is contained in:
2025-10-31 10:05:32 +01:00
parent 8ec5a8e49e
commit 45ae372b8c
3 changed files with 16 additions and 3 deletions

View File

@@ -27,7 +27,12 @@ class SystemInfoHandler(http.server.SimpleHTTPRequestHandler):
else:
super().do_GET()
with socketserver.TCPServer(('', PORT), SystemInfoHandler) as httpd:
class QuietSystemInfoHandler(SystemInfoHandler):
def log_message(self, format, *args):
if self.path != '/stats':
super().log_message(format, *args)
with socketserver.TCPServer(('', PORT), QuietSystemInfoHandler) as httpd:
print("serving at port", PORT)
try:
httpd.serve_forever()