Skip to content
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

Open
wants to merge 6 commits into
base: 4.x
Choose a base branch
from
Open

cakephp 5.1 elastica 8.x #322

wants to merge 6 commits into from

Conversation

skie
Copy link
Member

@skie skie commented Nov 14, 2024

No description provided.

src/Datasource/Log/ElasticLogger.php Outdated Show resolved Hide resolved
@@ -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') {
Copy link
Member

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?

Copy link
Member Author

@skie skie Nov 21, 2024

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>
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