Error message

User warning: The following module is missing from the file system: imagcache_actions. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1143 of /var/www/vhosts/

How to print with style to watchdog without devel


So sometimes i want to make some development on live sites that i do not want to enable and disable the Devel module due to perfomance issues.
I found from dropbucket ( this awesome snippet that helps me a lot with "background backoffice" development. You can print arrays or objects to watchdog that looks pretty and structured too (in a more human-readable way actually)!

("my_module", '<pre>' . print_r( $my_array_or_object, true) . '</pre>');

Have fun!
p.s: Do not forget to enable the System Log module (database logging / dblog module) for that. The admin page of the module is this: admin/reports/dblog

this is an arrow pointing back to the top of the page