Use below lines of code to print an array or object in watchdog Drupal.
// Directly use values.
watchdog("log_name", '<pre>' . print_r( $my_object, true) . '</pre>');
// With place holder as per Drupal standard.
watchdog('log_name', '<pre>@place_holder</pre>',
array('@place_holder', print_r( $my_array, TRUE))
);
3 comments:
Nice Blog! Thank you so much for sharing this one really well defined all peaceful info,I Really like it,Love it- Hire Drupal Developer
Thanks Raj :)
Thanks Raghu :)
Post a Comment