mirror of
https://github.com/Seldaek/monolog.git
synced 2026-04-26 08:05:53 +03:00
[GH-ISSUE #1789] "Object of class Monolog\Level could not be converted to int" #758
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#758
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 @NavyCoat on GitHub (Jan 26, 2023).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/1789
Monolog version 3.2
I'm experiencing strange behavior from Monolog when using any logging method.
Inside foobar method I'm just executing
$this->logger->error('lorem ipsum');I am still trying to understand why this is happening.
I tried to reproduce the steps in 3v4l.org and on my local env, but this only happens on my prod env.
Can this be related to this package, or is this something with opcache, maybe? Any idea how to fix this?
@stof commented on GitHub (Jan 27, 2023):
addRecordhas an argument type beingint|Level, so PHP should not try to convert the argument toint@Seldaek commented on GitHub (Feb 4, 2023):
Seems like an issue on your end but I can't imagine what would cause this. Perhaps incorrect version installed? Or like two versions in parallel from different pieces of software you run?
@Seldaek commented on GitHub (Feb 4, 2023):
I mean opcache could be a thing if you don't clear it on deploy and you have some old or new Logger class in there, but it sounds weird even then..
@sakarikl commented on GitHub (Feb 6, 2023):
This same thing happens to us. And affects only servers where Instana is installed (instana.io)
@sakarikl commented on GitHub (Feb 6, 2023):
I bet that for us Instana hooks into monolog in PHP process and now does it using old interface.
@NavyCoat commented on GitHub (Feb 6, 2023):
@sakarikl Thanks for a clue! I'm not using Instana, but maybe I have another tool that is doing something like it.
@NavyCoat commented on GitHub (Feb 8, 2023):
Lol, that was Instana, indeed. 😂 Thanks @sakarikl !
@sakarikl commented on GitHub (Feb 8, 2023):
I got a patch file from instana support that basically just changed enum usages to integers. And no timeline when actual fix would be available. :)
@matt-horwood-mayden commented on GitHub (Sep 12, 2023):
Hello,
We are running instana and have also hit this issue, Instana have provided a patch that should fix the issue. But they seem to think its a Monolog issue.
Here is the patch if you need it, not sure if this should land as a PR also
@Seldaek commented on GitHub (Sep 12, 2023):
Yeah sorry but we are not going to patch this like that, it makes no sense. They should make sure to update their support to include Monolog 3.
@sakarikl commented on GitHub (Sep 12, 2023):
We ended up dumping Instana altogether mainly because of this.
@bkuschel commented on GitHub (Nov 30, 2023):
We are looking at the issue and investigating a possible fix for the Instana PHP Tracer.
@ltrk2 commented on GitHub (Feb 26, 2024):
@NavyCoat @sakarikl @Seldaek
We fixed the behaviour identified in this issue by rolling out general support for Monolog 3 with Instana PHP Tracer 3.0.0.
@matt-horwood-mayden commented on GitHub (Feb 27, 2024):
Morning @ltrk2
Do you have a planed release data for that?
@ltrk2 commented on GitHub (Feb 27, 2024):
@matt-horwood-mayden it's already out. It was rolled out across the board yesterday (February 26).