[GH-ISSUE #1082] NOTICE not logged when WordPress Debug mode OFF #436

Closed
opened 2026-03-04 02:15:01 +03:00 by kerem · 6 comments
Owner

Originally created by @burhandodhy on GitHub (Nov 16, 2017).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/1082

Hi,

I'm integrating Monolog into WordPress plugin, but I'm facing the issue that when WordPress Debug mode is Off, the notices are not logged in log file.

Originally created by @burhandodhy on GitHub (Nov 16, 2017). Original GitHub issue: https://github.com/Seldaek/monolog/issues/1082 Hi, I'm integrating Monolog into WordPress plugin, but I'm facing the issue that when WordPress Debug mode is Off, the notices are not logged in log file.
kerem 2026-03-04 02:15:01 +03:00
  • closed this issue
  • added the
    Support
    label
Author
Owner

@dnaber-de commented on GitHub (Nov 16, 2017):

A bit of information about what you did and how would be great.

<!-- gh-comment-id:344906857 --> @dnaber-de commented on GitHub (Nov 16, 2017): A bit of information about what you did and how would be great.
Author
Owner

@burhandodhy commented on GitHub (Nov 16, 2017):

WP_DEBUG is WordPress constant when its set to be "True" WordPress shows warnings and fatal errors, plus all the warnings and errors are logged in Monolog file.

When I set the WP_DEBUG to "False", Monolog only logged fatal errors in log file not the Notices and Warnings.

<!-- gh-comment-id:344908224 --> @burhandodhy commented on GitHub (Nov 16, 2017): WP_DEBUG is WordPress constant when its set to be "True" WordPress shows warnings and fatal errors, plus all the warnings and errors are logged in Monolog file. When I set the WP_DEBUG to "False", Monolog only logged fatal errors in log file not the Notices and Warnings.
Author
Owner

@bueltge commented on GitHub (Nov 16, 2017):

I think you can save your time if you need Monolog in the WP environment, see this solution https://github.com/inpsyde/wonolog

<!-- gh-comment-id:344908799 --> @bueltge commented on GitHub (Nov 16, 2017): I think you can save your time if you need Monolog in the WP environment, see this solution https://github.com/inpsyde/wonolog
Author
Owner

@gmazzap commented on GitHub (Nov 16, 2017):

@burhandodhy Monolog is a tool that knownothing about WordPress, you can use it in WordPress but you have to configure it.

Is it possible that you are using Wonolog? Because that's sound the default behavior of Wonolog, that is configurable by the way (see its docs).

<!-- gh-comment-id:344908809 --> @gmazzap commented on GitHub (Nov 16, 2017): @burhandodhy Monolog is a tool that knownothing about WordPress, you can use it in WordPress but _you_ have to configure it. Is it possible that you are using [Wonolog](https://github.com/inpsyde/Wonolog)? Because that's sound the default behavior of Wonolog, that is configurable by the way (see its docs).
Author
Owner

@burhandodhy commented on GitHub (Nov 16, 2017):

Thanks @bueltge for the suggestion.

@gmazzap Wonolog needs PHP 5.6+ whereas most of WordPress users are still using PHP 5.4 and PHP 5.5. This is the main reason i'm going with Monolog

<!-- gh-comment-id:344910556 --> @burhandodhy commented on GitHub (Nov 16, 2017): Thanks @bueltge for the suggestion. @gmazzap Wonolog needs PHP 5.6+ whereas most of WordPress users are still using PHP 5.4 and PHP 5.5. This is the main reason i'm going with Monolog
Author
Owner

@dnaber-de commented on GitHub (Nov 16, 2017):

Monolog is a tool that knownothing about WordPress, you can use it in WordPress but you have to configure it.

That's why I asked about what you did. Show some code! However, https://wordpress.stackexchange.com/ might be the better platform for your problem.

<!-- gh-comment-id:344912553 --> @dnaber-de commented on GitHub (Nov 16, 2017): > Monolog is a tool that knownothing about WordPress, you can use it in WordPress but you have to configure it. That's why I asked about what you did. Show some code! However, https://wordpress.stackexchange.com/ might be the better platform for your problem.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/monolog#436
No description provided.