function dlm

8.0.x drush.inc dlm($object)
6.x drush.inc dlm($object)
7.x drush.inc dlm($object)
3.x drush.inc dlm($object)
4.x drush.inc dlm($object)
5.x drush.inc dlm($object)
master drush.inc dlm($object)

Run print_r on a variable and log the output.

Related topics

File

includes/drush.inc, line 1379
The drush API implementation and helpers.

Code

function dlm($object) {
  ob_start();
  print_r($object);
  $contents = ob_get_contents();
  ob_end_clean();

  drush_log($contents);
}