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

Monolog Crash on stringify #1392

Closed
molanostephane opened this issue Oct 28, 2019 · 6 comments
Closed

Monolog Crash on stringify #1392

molanostephane opened this issue Oct 28, 2019 · 6 comments
Labels
Milestone

Comments

@molanostephane
Copy link

We are using Monolog version 2.0.0 that comes with Laravel 6.2 and we are facing an error when monolog uses the function "stringify" on a trace containing non utf-8 characters (basically when one of the lines of the array "$fields", 1st parameter of the function stringify(), is identified as "binary" by laravel : see screenshot)

chrome_NRXjkNZov7

The error is the following and you'll find the full trace after (BUG.MONOLOG is an .html changed to .txt)

'Return value of Monolog\Handler\Slack\SlackRecord::stringify() must be of the type string, boolean returned'

BUG MONOLOG.txt

Funny that the error that monolog wanted to return is also affected by this UTF8 problem. This is not the topic, we solved it on our side, but the real problem is that :

Here, we just would like Monolog to be able to log our errors.

Feel free to ask for more questions if you need,

@Seldaek
Copy link
Owner

Seldaek commented Nov 12, 2019

I believe this is fixed but would be happy if you can verify this by requiring monolog ^2.0@dev

@Seldaek Seldaek added the Bug label Nov 12, 2019
@Seldaek Seldaek added this to the 1.x milestone Nov 12, 2019
@mmenozzi
Copy link

Hi @Seldaek,
isn't this fix for 1.x a BC break? You removed the public method \Monolog\Formatter\NormalizerFormatter::detectAndCleanUtf8.

@Seldaek
Copy link
Owner

Seldaek commented Nov 18, 2019

It had a @private annotation so I'd say it's fine..

@mmenozzi
Copy link

Ah ok @Seldaek didn't noticed the @private annotation. Also the IDE (PhpStorm) didn't highlighted as it does when using @internal. I think that @internal is the "standard" annotation to use in such cases (https://docs.phpdoc.org/references/phpdoc/tags/internal.html).

@Seldaek
Copy link
Owner

Seldaek commented Nov 18, 2019 via email

@mmenozzi
Copy link

Yes no problem man! 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants