forked from phoenix/litellm-mirror
(feat) proxy: custom_logger for I/O logging
This commit is contained in:
parent
b1bd799be8
commit
ed8c666922
1 changed files with 3 additions and 1 deletions
|
@ -117,7 +117,9 @@ app.add_middleware(
|
|||
allow_methods=["*"],
|
||||
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
|
||||
if otel_logging != True:
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue