function statsd_watchdog in StatsD 7
Same name and namespace in other branches
- 6 statsd.module \statsd_watchdog()
- 7.2 statsd.module \statsd_watchdog()
Implements hook_watchdog().
File
- ./
statsd.module, line 105
Code
function statsd_watchdog($entry) {
if (strstr($entry['message'], 'Login attempt failed for')) {
statsd_user_login_failed($entry['user']);
}
$enabled = variable_get('statsd_watchdog_events', 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);
}