mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-09 03:18:44 +00:00
Honour runs_on_no_log in should_run_callback instead of sniffing class names
This commit is contained in:
parent
18a4031dfc
commit
30caa9e4e1
1 changed files with 15 additions and 1 deletions
|
|
@ -1669,7 +1669,21 @@ class Logging(LiteLLMLoggingBaseClass):
|
|||
if litellm_params.get("no-log", False) is True:
|
||||
# proxy cost tracking cal backs should run
|
||||
|
||||
if not (isinstance(callback, CustomLogger) and "_PROXY_" in callback.__class__.__name__):
|
||||
if not (
|
||||
|
||||
isinstance(callback, CustomLogger)
|
||||
|
||||
and (
|
||||
|
||||
callback.runs_on_no_log
|
||||
|
||||
# Retained for callbacks predating `runs_on_no_log`.
|
||||
|
||||
or "_PROXY_" in callback.__class__.__name__
|
||||
|
||||
)
|
||||
|
||||
):
|
||||
verbose_logger.debug("no-log request, skipping logging for %s event", event_hook)
|
||||
return False
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue