<#9327 feature: Support emitting logs with timesta...
# meltano-repo-activity
g
#9327 feature: Support emitting logs with timestamps in local time Issue created by edgarrmondragon ### Feature scope Configuration (settings parsing, validation, etc.) ### Description Currently, logs are emitted with timestamps in UTC. That's because
utc=True
is the default of
structlog.processors.TimeStamper
, which is used here: meltano/src/meltano/core/logging/formatters.py Line 29 in</meltano/meltano/commit/cd40543b0a88f66768a10b43d5fbfab31344bdbb|cd40543> | TIMESTAMPER = structlog.processors.TimeStamper(fmt="iso") | | --------------------------------------------------------- | We could easily make this configurable in the
foreign_pre_chain
inside of `_process_formatter`: meltano/src/meltano/core/logging/formatters.py Lines 118 to 140 in</meltano/meltano/commit/cd40543b0a88f66768a10b43d5fbfab31344bdbb|cd40543> | def _process_formatter( | | --------------------------------------------------------------------------- | | *processors: Processor, | | **kwargs: t.Any, | | ) -> structlog.stdlib.ProcessorFormatter: | | """Use _process_formatter to configure a structlog.stdlib.ProcessFormatter. | | | | It will automatically add log level and timestamp fields to any log entries | | not originating from structlog. | | | | Args: | | *processors: One or more structlog message processors such as | |
structlog.dev.ConsoleRenderer
. | | **kwargs: Additional keyword arguments to pass to the logging.Formatter | | constructor. | | | | Returns: | | A log record formatter. | | """ | | return structlog.stdlib.ProcessorFormatter( | | processors=processors, | | foreign_pre_chain=LEVELED_TIMESTAMPED_PRE_CHAIN, | | **kwargs, | | ) | ## Links • https://meltano.slack.com/archives/C069CPBCVPV/p1750863928167889 meltano/meltano