Drupal: How To Write To The Log
One of the challenges with drupal is trying to figure out whether modules are getting called when crontab runs or not (for example, the ping module). Even those who do not write code can modify the functions in existing modules to output to the log using the following line of code:
watchdog('TYPE', t('MESSAGE'), WATCHDOG_WARNING);
Of course, this should be completely unnecessary - all modules should provide info on their status, whether they ran, etc.
watchdog('TYPE', t('MESSAGE'), WATCHDOG_WARNING);
Of course, this should be completely unnecessary - all modules should provide info on their status, whether they ran, etc.
0 Comments:
Post a Comment
<< Home