fix - only log cache credentials in debug mode

This commit is contained in:
Ishaan Jaff 2024-06-05 09:58:45 -07:00
parent f790d41e7f
commit 19ac01a0d7

View file

@ -2363,19 +2363,30 @@ class ProxyConfig:
) )
# Assuming cache_type, cache_host, cache_port, and cache_password are strings # Assuming cache_type, cache_host, cache_port, and cache_password are strings
print( # noqa verbose_proxy_logger.debug(
f"{blue_color_code}Cache Type:{reset_color_code} {cache_type}" "%sCache Type:%s %s",
) # noqa blue_color_code,
print( # noqa reset_color_code,
f"{blue_color_code}Cache Host:{reset_color_code} {cache_host}" cache_type,
) # noqa )
print( # noqa verbose_proxy_logger.debug(
f"{blue_color_code}Cache Port:{reset_color_code} {cache_port}" "%sCache Host:%s %s",
) # noqa blue_color_code,
print( # noqa reset_color_code,
f"{blue_color_code}Cache Password:{reset_color_code} {cache_password}" cache_host,
)
verbose_proxy_logger.debug(
"%sCache Port:%s %s",
blue_color_code,
reset_color_code,
cache_port,
)
verbose_proxy_logger.debug(
"%sCache Password:%s %s",
blue_color_code,
reset_color_code,
cache_password,
) )
print() # noqa
if cache_type == "redis-semantic": if cache_type == "redis-semantic":
# by default this should always be async # by default this should always be async
cache_params.update({"redis_semantic_cache_use_async": True}) cache_params.update({"redis_semantic_cache_use_async": True})