Sitemaps: Make the reporter log success messages only if JETPACK_DEV_DEBUG is defined #8184
Sitemaps: Make the reporter log success messages only if JETPACK_DEV_DEBUG is defined #8184
Conversation
|
@eliorivero would you say this is fine ? (I think you authored this line and the original check for WP_DEBUG) |
|
I would personally vote to keep those when WP_DEBUG is on, as it can be useful when debugging Sitemaps issues on live sites, where we would not want to turn on Jetpack Dev mode. Just my personal opinion though. |
|
I was going to reply the following: ... But you have a point. Still, I would remove the success messages that clutter the log with, IMO meaningless information about the success. Why log that everything went well for just this particular feature of Jetpack ? |
|
What if we log the success messages if both WP_DEBUG and JETPACK_DEV_DEBUG are defined and the errors if WP_DEBUG is defined ? |
…if JETPACK_DEV_DEBUG is also enabled.
I like that. That makes perfect sense to me. 👍 |
6190f71 to
fe6d86e
Compare
|
Thanks for the feedback @jeherve ! If this just does not help in anything for debugging, we can close it. |
* Changelog 5.6: create base for changelog. * Update changelog with 5.5.1 info. * Changelog: add #7930 and #8238 * Changelog: add #8076 * Changelog: add #8100 * Changelog: add #8117 * Changelog: add #8141 * Changelog: add #8143 * Changelog: add #8147 * Changelog: add #8149 * Changelog: add #8153 * Changelog: add #8173 * Changelog: add #8184 * Changelog: add #8196 * Changelog: add #8199 * Changelog: add #8093 * Changelog: add #8171 * Changelog: add #8182 * Changelog: add #8202, #8222 * Changelog: add #8228 * Changelog: add #8240 * Changelog: add #8251 * remove AL card change
Makes the report method
Jetpack_Sitemap_Logger ::report()only log success messages ifJETPACK_DEV_DEBUGis defined.Error logs in several sites I'm using are filled with this piece of information which is not actually useful, specially when
WP_DEBUGis turned on to observe possible errors happening. Message are like:Changes proposed in this Pull Request:
WP_DEBUGto be a check for bothWP_DEBUGandJETPACK_DEV_DEBUGinstead for success messages and just a check forWP_DEBUGfor error messages.Testing instructions:
WP_DEBUGtotrue.wp jetpack sitemaps rebuild).JETPACK_DEV_DEBUGtotrue.