pluginkollektiv / antispam-bee

„... another popular solution to fight spam is Antispam Bee“ – Matt Mullenweg, Q&A WordCamp Europe 2014
https://wordpress.org/plugins/antispam-bee/
GNU General Public License v2.0
163 stars 27 forks source link

Introduce Debug Mode #548

Open Zodiac1978 opened 10 months ago

Zodiac1978 commented 10 months ago

Following the last v3 introduction, I see the need to better understand what is happening in each module.

Proposal: What about adding a new setting called "Enable Debug Mode" to our options.

In each module we can check if this option is enabled and if yes, we log additional information, like this ...

This way we could better see in the beta phase (with enabled debug mode) what is happening is where thing go wrong.

florianbrinkmann commented 10 months ago

I added a DebugMode class in https://github.com/pluginkollektiv/antispam-bee/commit/adb250e044a8f7517881851fdc1c72e353d0caf5 which can be used to log things to a debug log file in wp-content if the ANTISPAM_BEE_DEBUG_MODE_ENABLED constant is set to true. I also added first loggings to the rule handling and the precheck method of the honeypot.