You are here

function hook_raven_watchdog_filter_alter in Raven: Sentry Integration 7.3

Same name and namespace in other branches
  1. 7.4 raven.api.php \hook_raven_watchdog_filter_alter()
  2. 7 raven.api.php \hook_raven_watchdog_filter_alter()
  3. 7.2 raven.api.php \hook_raven_watchdog_filter_alter()

Modify or suppress watchdog entries before logging them to Sentry.

Parameters

array $filter: A reference to array containing the log entry and data to submit to Sentry.

1 function implements hook_raven_watchdog_filter_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

raven_test_raven_watchdog_filter_alter in tests/raven_test.module
Implements hook_raven_filter_alter().
1 invocation of hook_raven_watchdog_filter_alter()
raven_watchdog in ./raven.module
Implements hook_watchdog().

File

./raven.api.php, line 50
Sample hooks demonstrating usage of Raven.

Code

function hook_raven_watchdog_filter_alter(array &$filter) {

  // Ignore "foo" log entries.
  if ($filter['log_entry']['type'] === 'foo') {
    $filter['process'] = FALSE;
  }

  // Set the flavor tag.
  $filter['data']['tags']['flavor'] = 'strawberry';
}