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

ErrorHandler::register not working as expected #1915

Open
kaihendry opened this issue Sep 21, 2024 · 3 comments
Open

ErrorHandler::register not working as expected #1915

kaihendry opened this issue Sep 21, 2024 · 3 comments
Labels

Comments

@kaihendry
Copy link

Monolog version 3.7

https://gist.github.com/kaihendry/6ad32ed135e3d679e6dd896365b252cb

The error handler is not working as expected, it shows:

  {"level":"info","ts":1726946030.4808884,"msg":"capture me monolog","syslog_level":"notice"}
@stof
Copy link
Contributor

stof commented Sep 24, 2024

what do you mean by "it is not working as expected" ?

@kaihendry
Copy link
Author

I expected monolog to hook into error_log

@stof
Copy link
Contributor

stof commented Sep 24, 2024

PHP's error_log function does not report its messages to the PHP error handler system. It directly sends it to the PHP system logger, which is not hookable in userland.

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

No branches or pull requests

2 participants