-
Notifications
You must be signed in to change notification settings - Fork 1
atmosphere_debug_log
github-actions[bot] edited this page Jul 15, 2026
·
10 revisions
Filters whether an ATmosphere debug message is written to the error log.
Defaults to the WP_DEBUG state. Return true to surface ATmosphere log
lines independently of WP_DEBUG (useful for operators who want the
genuine anomaly breadcrumbs — failed cron PDS writes, thread-rollback
orphans — without enabling debugging site-wide), or false to silence
them entirely.
/**
* Filters whether an ATmosphere debug message is written to the error log.
*
* Defaults to the `WP_DEBUG` state. Return true to surface ATmosphere log
* lines independently of `WP_DEBUG` (useful for operators who want the
* genuine anomaly breadcrumbs — failed cron PDS writes, thread-rollback
* orphans — without enabling debugging site-wide), or false to silence
* them entirely.
*
* @param bool $enabled
* @param string $message
* @return bool The filtered value.
*/
function my_atmosphere_debug_log_callback( bool $enabled, string $message ) {
// Your code here.
return $enabled;
}
add_filter( 'atmosphere_debug_log', 'my_atmosphere_debug_log_callback', 10, 2 );-
bool$enabledWhether to write the message. Defaults toWP_DEBUG. -
string$messageThe message about to be logged (without the[atmosphere]prefix).
\apply_filters(
'atmosphere_debug_log',
\defined( 'WP_DEBUG' ) && \WP_DEBUG,
$message
)