mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-10 03:28:53 +00:00
docs: add comprehensive docstrings to logging utility functions
- Add docstring to _redact_string explaining behavior with redaction setting - Add docstring to _turn_on_debug explaining debug-level logging enablement - Add docstring to _disable_debugging explaining logger suppression - Add docstring to _enable_debugging explaining logger re-enablement - Add docstring to print_verbose noting legacy status and secret redaction
This commit is contained in:
parent
79b4578671
commit
7fdef46a2a
1 changed files with 13 additions and 0 deletions
|
|
@ -411,12 +411,25 @@ def _disable_debugging():
|
|||
|
||||
|
||||
def _enable_debugging():
|
||||
"""Enable all LiteLLM verbose loggers.
|
||||
|
||||
Re-enables output from the package, router, and proxy loggers after they
|
||||
have been disabled.
|
||||
"""
|
||||
verbose_logger.disabled = False
|
||||
verbose_router_logger.disabled = False
|
||||
verbose_proxy_logger.disabled = False
|
||||
|
||||
|
||||
def print_verbose(print_statement):
|
||||
"""Print a statement if verbose mode is enabled, with secrets redacted.
|
||||
|
||||
This is a legacy function that checks the deprecated set_verbose flag.
|
||||
For new code, use the logging system directly instead.
|
||||
|
||||
Args:
|
||||
print_statement: The message to print. Will be converted to string.
|
||||
"""
|
||||
try:
|
||||
if set_verbose:
|
||||
print(redact_secrets(str(print_statement))) # noqa
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue