mirror of
https://github.com/Seldaek/monolog.git
synced 2026-04-25 23:55:56 +03:00
[GH-ISSUE #1660] Error Elasticsearch client reference and not supported _type tag #711
Labels
No labels
Bug
Documentation
Feature
Needs Work
Support
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/monolog#711
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @davidfabbretti on GitHub (Apr 26, 2022).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/1660
github.com/Seldaek/monolog@4192345e26/src/Monolog/Handler/ElasticsearchHandler.php (L21)Must be:
use Elastic\Elasticsearch\Client;
AND
github.com/Seldaek/monolog@4192345e26/src/Monolog/Handler/ElasticsearchHandler.php (L138)Unsupported _type tag
@davidfabbretti commented on GitHub (Apr 26, 2022):
laravel.EMERGENCY: Unable to create configured logger. Using emergency logger. {"exception":"[object] (TypeError(code: 0): Monolog\Handler\ElasticsearchHandler::__construct(): Argument #1 ($client) must be of type Elasticsearch\Client, Elastic\Elasticsearch\Client given, called in /app/Providers/ElasticLogProvider.php on line 44 at /vendor/monolog/monolog/src/Monolog/Handler/ElasticsearchHandler.php:60)
@davidfabbretti commented on GitHub (Apr 26, 2022):
400 Bad Request: {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Action/metadata line [1] contains an unknown parameter [_type]"}],"type":"illegal_argument_exception","reason":"Action/metadata line [1] contains an unknown parameter [_type]"},"status":400}
@Seldaek commented on GitHub (May 3, 2022):
The problem is you're using elasticsearch/elasticsearch v8 which changed some things.
See #1662 for ES8 support, but in the meantime I suggest you use v7.
@ezimuel commented on GitHub (May 7, 2022):
@davidfabbretti the
_typeis not supported anymore in Elasticsearch 8. This parameter has been deprecated in Elasticsearch 7, read here for more details.@Seldaek commented on GitHub (May 8, 2022):
OK should be fixed by #1662
Monolog\Formatter\JsonFormatter#1310