protected static function ExpireAPI::debugLog in Cache Expiration 7.2
Log debug information.
Parameters
$absolute_urls:
$wildcards:
$object_type:
1 call to ExpireAPI::debugLog()
- ExpireAPI::executeExpiration in includes/
expire.api.inc - Executes internal or external cache expiration.
File
- includes/
expire.api.inc, line 459 - Provides internal API for page cache flushes.
Class
- ExpireAPI
- @file Provides internal API for page cache flushes.
Code
protected static function debugLog($absolute_urls, $wildcards, $object_type) {
$debug = variable_get('expire_debug', EXPIRE_DEBUG_DISABLED);
if (empty($debug)) {
return;
}
$output_urls = array();
foreach ($absolute_urls as $internal_path => $url) {
$wildcard = !empty($wildcards[$internal_path]) ? 'true' : 'false';
$output_urls[] = t('URL: @url', array(
'@url' => check_url($url),
));
$output_urls[] = t('Wildcard: @wildcard', array(
'@wildcard' => $wildcard,
));
$output_urls[] = t('Expired object: @type', array(
'@type' => $object_type ? $object_type : '(none)',
));
$output_urls[] = '--------';
}
// Log debug message in watchdog.
$message = t('Expiration was executed for the next URLs: !urls', array(
'!urls' => theme('item_list', array(
'items' => $output_urls,
)),
));
watchdog('expire', $message, array(), WATCHDOG_DEBUG);
// For development might be useful to print info on screen.
if ($debug == EXPIRE_DEBUG_FULL) {
drupal_set_message($message);
}
}