Skip to content

Conversation

@namespacebrian
Copy link
Contributor

Summary

Add timestamps to all logger output messages in the YYYY-MM-DD hh:mm:ss UTC[+/-offset] format using the local timezone.

Changes

  • Created TimestampedLogOutputStyler class that extends LogOutputStyler to preserve colors and formatting
  • Modified Terminus.php to configure the logger with the timestamped styler after Robo container setup
  • Timestamps are prepended to all log messages while maintaining original styling and color

Test plan

  • Verify timestamps appear on all log levels (notice, warning, error, debug)
  • Confirm original formatting and colors are preserved
  • Test with various Terminus commands to ensure consistent behavior
  • Validate timestamp format matches specification: YYYY-MM-DD hh:mm:ss UTC[+/-offset]

Example output

2025-11-06 14:55:03 UTC[+0000] [notice] Command: example-site.live -- drush status [Exit: 0] (Attempt 1/1)
2025-11-06 14:55:03 UTC[+0000] [error] Command failed with exit code 1

- Create TimestampedLogOutputStyler that extends LogOutputStyler
- Implement timestamp formatting in YYYY-MM-DD hh:mm:ss UTC[+/-offset] format
- Configure Terminus to use timestamped logger after Robo container setup
- Preserve original log message formatting and colors
- Timestamps appear in local timezone with proper UTC offset
@namespacebrian namespacebrian requested a review from a team as a code owner November 6, 2025 15:05
@namespacebrian namespacebrian merged commit b169732 into 4.x Nov 24, 2025
9 checks passed
@namespacebrian namespacebrian deleted the DEVX-5946 branch November 24, 2025 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants