Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion application_sdk/observability/logger_adaptor.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,11 +288,18 @@ def __init__(self, logger_name: str) -> None:

# Update format string to use the bound logger_name
atlan_format_str = "<green>{time:YYYY-MM-DD HH:mm:ss}</green> <blue>[{level}]</blue> <cyan>{extra[logger_name]}</cyan> - <level>{message}</level>"

# Colorize the logs only if the log level is DEBUG
if LOG_LEVEL == "DEBUG":
colorize = True
else:
colorize = False

self.logger.add(
sys.stderr,
format=atlan_format_str,
level=SEVERITY_MAPPING[LOG_LEVEL],
colorize=True,
colorize=colorize,
)

# Add sink for parquet logging only if Dapr sink is enabled
Expand Down