You are here

function views_debug in Views (for Drupal 7) 6.3

Same name and namespace in other branches
  1. 6.2 views.module \views_debug()
  2. 7.3 views.module \views_debug()

Provide debug output for Views. This relies on devel.module

1 call to views_debug()
vpr in ./views.module
Shortcut to views_debug()

File

./views.module, line 1148
Primarily Drupal hooks and global API functions to manipulate views.

Code

function views_debug($message) {
  if (module_exists('devel') && variable_get('views_devel_output', FALSE) && user_access('access devel information')) {
    if (is_string($message)) {
      $output = $message;
    }
    else {
      $output = var_export($message, TRUE);
    }
    if (variable_get('views_devel_region', 'footer') != 'watchdog') {
      drupal_set_content(variable_get('views_devel_region', 'footer'), '<pre>' . $output . '</pre>');
    }
    else {
      watchdog('views_logging', '<pre>' . $output . '</pre>');
    }
  }
}