I am about to develop a custom module that will hook into a hook that is triggered when cron runs. Since the module will be activated during a cron run, i am not sure how to go about giving myself feedback as I develop. If I was working with javascript I could use console.log(myvar)
to log information about variables etc.
If I was developing a module that ran on a page I could use the devel module and use dpm() in my module code.
However since this module will run with cron, dpm() doesn't seem like the best way of doing this.
From searching around I see that watchdog('error title', 'error message');
could have been a good way of doing this in Drupal 6.
What is the Drupal 7 way of logging messages during custom module development?
drupal_debug()
/dd()
from devel. It can be useful whendpm()
doesn't display any output.