function statsd_watchdog in StatsD 6
Same name and namespace in other branches
- 7.2 statsd.module \statsd_watchdog()
- 7 statsd.module \statsd_watchdog()
Implementation of hook_watchdog()
File
- ./
statsd.module, line 96
Code
function statsd_watchdog($entry) {
if (strstr($entry['message'], 'Login attempt failed for')) {
statsd_user_login_failed($entry['user']);
}
$enabled = variable_get('statsd_watchdog', TRUE);
$level = variable_get('statsd_watchdog_level', WATCHDOG_WARNING);
if (!$enabled || $level < $entry['severity']) {
return;
}
$levels = watchdog_severity_levels();
$data = array(
'watchdog.type.' . $entry['type'],
'watchdog.severity.' . $levels[$entry['severity']],
);
statsd_call($data);
}