File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -29,11 +29,20 @@ def init_external_logging_from_env() -> None:
2929 Environment variables:
3030 - FW_TRACING_GATEWAY_BASE_URL: enable Fireworks tracing handler when set
3131 - EP_ELASTICSEARCH_URL, EP_ELASTICSEARCH_API_KEY, EP_ELASTICSEARCH_INDEX: enable ES when all set
32+ - EP_LOGGING_RAISE_EXCEPTIONS: if set to "false" or "0", disable logging exceptions (default: True)
3233 """
3334 global _INITIALIZED
3435 if _INITIALIZED :
3536 return
3637
38+ # Configure logging.raiseExceptions based on environment variable
39+ # If set to "false" or "0", logging errors will be silently ignored
40+ raise_exceptions_env = _get_env ("EP_LOGGING_RAISE_EXCEPTIONS" )
41+ if raise_exceptions_env is not None :
42+ logging .raiseExceptions = raise_exceptions_env .lower () in ("true" , "1" , "no" )
43+ else :
44+ logging .raiseExceptions = False
45+
3746 root_logger = logging .getLogger ()
3847
3948 # Ensure we do not add duplicate handlers if already present
You can’t perform that action at this time.
0 commit comments