[GH-ISSUE #1417] ElasticsearchFormatter: Force record values to be strings #592

Closed
opened 2026-03-04 02:16:14 +03:00 by kerem · 1 comment
Owner

Originally created by @tomsommer on GitHub (Jan 7, 2020).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/1417

Monolog version 2

ElasticsearchFormatter should force all records to be strings, since ElasticSearch will fail on field types mixing in an index.

It would also make sense to not allow deep arrays, basically flatten arrays and make them scalar.

Originally created by @tomsommer on GitHub (Jan 7, 2020). Original GitHub issue: https://github.com/Seldaek/monolog/issues/1417 Monolog version 2 ElasticsearchFormatter should force all records to be strings, since ElasticSearch will fail on field types mixing in an index. It would also make sense to not allow deep arrays, basically flatten arrays and make them scalar.
kerem 2026-03-04 02:16:14 +03:00
Author
Owner

@Seldaek commented on GitHub (May 11, 2020):

I don't think we can really do that without breaking BC.. It just means that currently you have to manage your context data carefully yourself.. The data provided by Monolog itself is consistently typed AFAIK. IMO this fact makes ElasticSearch generally speaking a poor choice for log storage but I can't choose what people use..

<!-- gh-comment-id:626885307 --> @Seldaek commented on GitHub (May 11, 2020): I don't think we can really do that without breaking BC.. It just means that currently you have to manage your context data carefully yourself.. The data provided by Monolog itself is consistently typed AFAIK. IMO this fact makes ElasticSearch generally speaking a poor choice for log storage but I can't choose what people use..
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/monolog#592
No description provided.