mirror of
https://github.com/Seldaek/monolog.git
synced 2026-04-26 08:05:53 +03:00
[GH-ISSUE #1082] NOTICE not logged when WordPress Debug mode OFF #436
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#436
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 @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.
@dnaber-de commented on GitHub (Nov 16, 2017):
A bit of information about what you did and how would be great.
@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.
@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
@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).
@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
@dnaber-de commented on GitHub (Nov 16, 2017):
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.