You are here

function devel_debug_log_ob_kint in Devel Debug Log 8

Provides debug output for later printing.

kint() outputs the debug information at the top of the page. This function allows you to get the output and use it for later printing.

Parameters

mixed $message: The data that's displayed for debugging.

Return value

string The debug information.

1 call to devel_debug_log_ob_kint()
ddl in ./devel_debug_log.module
Saves a debug message.

File

./devel_debug_log.module, line 96
Contains Drupal\devel_debug_log\devel_debug_log.module.

Code

function devel_debug_log_ob_kint($message) {
  ob_start();
  if (PHP_SAPI == 'cli') {
    Kint::dump($message);
  }
  else {
    kint($message);
  }
  $output = ob_get_contents();
  ob_end_clean();
  return $output;
}