Skip to content

Commit

Permalink
CustomTTYColoredFormatter should inherit TimezoneAware formatter
Browse files Browse the repository at this point in the history
So that the timestamp format is the same for both.
  • Loading branch information
dstandish committed Dec 28, 2022
1 parent 69df1c5 commit 03e974b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion airflow/utils/log/colored_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
from colorlog import TTYColoredFormatter
from colorlog.escape_codes import esc, escape_codes

from airflow.utils.log.timezone_aware import TimezoneAware

DEFAULT_COLORS = {
"DEBUG": "green",
"INFO": "",
Expand All @@ -38,7 +40,7 @@
BOLD_OFF = esc("22")


class CustomTTYColoredFormatter(TTYColoredFormatter):
class CustomTTYColoredFormatter(TTYColoredFormatter, TimezoneAware):
"""
Custom log formatter which extends `colored.TTYColoredFormatter`
by adding attributes to message arguments and coloring error
Expand Down

0 comments on commit 03e974b

Please sign in to comment.