feat: Suppress server logs and add server status to overlay
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user