timestamp_timezone_stamper
¶
| CLASS | DESCRIPTION |
|---|---|
TimezoneAwareTimeStamper |
Add a timestamp to |
TimezoneAwareTimeStamper
¶
TimezoneAwareTimeStamper(
*,
fmt: str | Literal["iso"] = "%Y-%m-%dT%H:%M:%S%z",
key: str = "timestamp",
now: Callable[[], datetime] = _default_now,
)
Add a timestamp to event_dict.
A workaround for the fact that structlog.processors.TimeStamper only supports UTC or naive (timezone-less) timestamps. Use this if you want to make the timezone explicit in the formatted log message.
| PARAMETER | DESCRIPTION |
|---|---|
|
strftime format string, or
TYPE:
|
|
Target key in event_dict for added timestamps.
TYPE:
|
|
Function that returns the current time when called
TYPE:
|
Source code in nava/platform/cli/logging/timestamp_timezone_stamper.py
40 41 42 43 44 45 46 47 48 49 | |