(feat) proxy: custom_logger for I/O logging

This commit is contained in:
ishaan-jaff 2023-12-04 08:44:20 -08:00
parent b1bd799be8
commit ed8c666922

View file

@ -117,7 +117,9 @@ app.add_middleware(
allow_methods=["*"], allow_methods=["*"],
allow_headers=["*"], allow_headers=["*"],
) )
def log_input_output(request, response): def log_input_output(request, response, custom_logger=None):
if custom_logger is not None:
custom_logger(request, response)
global otel_logging global otel_logging
if otel_logging != True: if otel_logging != True:
return return