-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cakephp 5.1 elastica 8.x #322
base: 4.x
Are you sure you want to change the base?
Conversation
@@ -118,6 +118,9 @@ public function log(mixed $level, Stringable|string $message, array $context = [ | |||
protected function _log(string $level, string $message, array $context = []): void | |||
{ | |||
$logData = $context; | |||
if ($level === LogLevel::INFO || $message !== 'Elastica Request') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What other kinds of logs are we dropping here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It coming from transport layer, so we getting 5 log entries per one request https://github.com/elastic/elastic-transport-php/blob/8be37d679637545e50b1cea9f8ee903888783021/src/Transport.php#L277
4 of it from transport, and last one from elastica client.
ROOT\src\Datasource\Log\ElasticLogger.php (line 121)
########## DEBUG ##########
'Request: GET http://localhost:9200/_stats'
###########################
ROOT\src\Datasource\Log\ElasticLogger.php (line 121)
########## DEBUG ##########
'Headers: {"Host":["localhost:9200"]}
Body: '
###########################
ROOT\src\Datasource\Log\ElasticLogger.php (line 121)
########## DEBUG ##########
'Response (retry 0): 200'
###########################
ROOT\src\Datasource\Log\ElasticLogger.php (line 121)
########## DEBUG ##########
'Headers: {"X-elastic-product":["Elasticsearch"],"content-type":["application\/json"],"Transfer-Encoding":["chunked"]}
Body: {"_shards":{"total":8,"successful":4,"failed":0},"_all":{"primaries":{"docs":{"count":100,"deleted":0,"total_size_in_bytes":1048486},"shard_stats":{"total_count":4},"store":{"size_in_bytes":1049279,"total_data_set_size_in_bytes":1049279,"reserved_in_bytes":0},"indexing":{"index_total":0,...
ROOT\src\Datasource\Log\ElasticLogger.php (line 121)
########## DEBUG ##########
'Elastica Request'
###########################
Co-authored-by: Mark Story <mark@mark-story.com>
No description provided.