Skip to content

Commit

Permalink
Add debug handler for request
Browse files Browse the repository at this point in the history
Signed-off-by: alex-ak1 <[email protected]>
  • Loading branch information
alex-ak1 committed Jul 26, 2024
1 parent 998b580 commit d8d5c08
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions prometheus_client/exposition.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,9 @@ class TmpServer(ThreadingWSGIServer):

TmpServer.address_family, addr = _get_best_family(addr, port)
app = make_wsgi_app(registry)
handler = _SilentHandler # type: WSGIRequestHandler
if debug:
handler = _PrintHandler
else:
handler = _SilentHandler
httpd = make_server(addr, port, app, TmpServer, handler_class=handler)
if certfile and keyfile:
context = _get_ssl_ctx(certfile, keyfile, protocol, client_cafile, client_capath, client_auth_required)
Expand Down

0 comments on commit d8d5c08

Please sign in to comment.