Closed jon-ht closed 4 years ago
I see it very helpful too! Thx
Should I also remove private string $index;
in ElasticRepository
? Index is available as method now, not passed in consutructor anymore
LGTM
I've a suggestion:
This repo is used also by lot of people that isn't familiar with some terms and concepts. In this case es
channel for monolog even if in this context looks clear that stand for ElasticSearch
in others, like when looking at monolog config, can end with a misunderstanding with Event Sourcing
. I suggest a rename the channel to elasticsearch
or whatever you think is specific enough.
What're your thoughts about it?
Totally make sense, I'll update channel name . And what about my question ?
Should I also remove
private string $index;
inElasticRepository
? Index is available as method now, not passed in consutructor anymore
Remove it is fine, no longer needed 👍
Merged! Thanks a lot!
This is really helpfull for debug as some ES requests are processed asynchronously (like update from Messenger consumer).
Logs are dumped in
var/logs/es_dev.log
. This config only applies on dev environment and fallbacks to main logger if$esLogger
is not configured.This is based on https://symfony.com/doc/current/logging/channels_handlers.html#how-to-autowire-logger-channels
Two kind of logger:
Logger configuration
Activated with
$defaultConfig['logger'] = $esLogger;
Tracer configuration
Activated with
$defaultConfig['tracer'] = $esLogger;