Skip to content

Add ECS and pretty print log formatters#730

Merged
gondek merged 1 commit intomasterfrom
logging-improvements
Feb 13, 2026
Merged

Add ECS and pretty print log formatters#730
gondek merged 1 commit intomasterfrom
logging-improvements

Conversation

@gondek
Copy link
Contributor

@gondek gondek commented Feb 12, 2026

I opted to write these log formatters manually, as I want to avoid adding additional composer dependencies for now until we do a security review.

In development, logs will look like:
image

In prod (or by default), logs will look like:

app-1  | {"@timestamp":"2026-02-13T20:20:59.849750Z","log.level":"info","message":"Accessing users::index","transaction.id":"743f9d17-e02a-4e22-b4e6-fbe805340518","ecs.version":"8.17.0","user.id":"34","user.name":"admin1"}
app-1  | {"@timestamp":"2026-02-13T20:21:00.282329Z","log.level":"info","message":"Accessing evaltools::index","transaction.id":"7f412068-da31-44b7-990c-6bd902258f81","ecs.version":"8.17.0","user.id":"34","user.name":"admin1"}
app-1  | {"@timestamp":"2026-02-13T20:21:14.301406Z","log.level":"info","message":"Accessing guard::logout","transaction.id":"28dc57f9-bb7d-47cb-8f1b-b8cefce928b2","ecs.version":"8.17.0","user.id":"34","user.name":"admin1"}
app-1  | {"@timestamp":"2026-02-13T20:21:14.303126Z","log.level":"info","message":"User admin1 logged out","transaction.id":"28dc57f9-bb7d-47cb-8f1b-b8cefce928b2","ecs.version":"8.17.0","user.id":"34","user.name":"admin1"}
app-1  | {"@timestamp":"2026-02-13T20:21:14.326872Z","log.level":"info","message":"Accessing guard::login","transaction.id":"110b1dca-70ee-442f-840d-6d27e0de6fb0","ecs.version":"8.17.0"}

@gondek gondek force-pushed the logging-improvements branch 3 times, most recently from 21d5bf8 to cfaae5e Compare February 13, 2026 20:33
@gondek gondek marked this pull request as ready for review February 13, 2026 20:34
@gondek gondek force-pushed the logging-improvements branch 2 times, most recently from 3963712 to 0148665 Compare February 13, 2026 20:39
@gondek gondek force-pushed the logging-improvements branch from 0148665 to 5037152 Compare February 13, 2026 21:17
@gondek gondek changed the title [WIP] Add ECS and pretty print log formatters Add ECS and pretty print log formatters Feb 13, 2026
Copy link
Member

@xcompass xcompass left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gondek gondek merged commit c8fd776 into master Feb 13, 2026
5 checks passed
@gondek gondek deleted the logging-improvements branch February 13, 2026 23:19
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.

2 participants