You are here

function _raven_get_enabled_error_levels in Raven: Sentry Integration 7

Returns PHP error levels which should be logged.

Return value

int Combination of the error levels, joined with the binary OR (|) operator.

1 call to _raven_get_enabled_error_levels()
_raven_error_handler in ./raven.module
PHP error handler.

File

./raven.module, line 236
Allows to track errors to Sentry server.

Code

function _raven_get_enabled_error_levels() {
  static $error_levels;
  if (!isset($error_levels)) {
    $error_levels = 0;
    $enabled_error_types = variable_get('raven_error_levels', array());
    foreach ($enabled_error_types as $level => $enabled) {
      if ($enabled) {
        $error_levels |= $level;
      }
    }
  }
  return $error_levels;
}