function _google_appliance_log_search_error in Google Search Appliance 7
report search errors to the log
1 call to _google_appliance_log_search_error()
- template_preprocess_google_appliance_results in theme/
google_appliance.theme.inc - Preprocess google-search-appliance-results.tpl.php (results page).
File
- ./
google_appliance.helpers.inc, line 160 - helper functions for the Search Google Appliance module
Code
function _google_appliance_log_search_error($search_keys = NULL, $error_string = NULL) {
$settings = _google_appliance_get_settings();
// build log entry
$type = 'google_appliance';
$message = 'Search for %keys produced error: %error_string';
$vars = array(
'%keys' => isset($search_keys) ? $search_keys : 'nothing (empty search submit)',
'%error_string' => isset($error_string) ? $error_string : 'undefinded error',
);
$link = l(t('view reproduction'), $settings['drupal_path'] . '/' . check_plain($search_keys));
watchdog($type, $message, $vars, WATCHDOG_NOTICE, $link);
}