Skip to content

Instantly share code, notes, and snippets.

@heyMP
Created December 7, 2013 17:39
Show Gist options
  • Save heyMP/7845915 to your computer and use it in GitHub Desktop.
Save heyMP/7845915 to your computer and use it in GitHub Desktop.
Logging a formatted Array to watchdog so it's readable. For development/debugging purposes only.
<?php
// Load up an array with variables you want to search through
$obj[] = $notification;
$obj[] = $invoice;
$obj[] = $user;
watchdog('module_name', 'Successfully Recieved Notification', array('@notification' => print_r($obj, 1)), WATCHDOG_NOTICE, 'link');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment