Tuesday, March 8, 2011

Logging in Drupal 7

 Logging in Drupal 7
 Debugging in Drupal 7

If you are coming from java world .logging is what you are looking for or missing it.


Drupal has inbuilt logging system called watchdog which is enabled by default
Click on Reports->Recent log Messages you will find current log entries.


Next step is in your code just place the below line where you want the logger


watchdog('name of your module as declared in your .info file ', 'some text', array(), WATCHDOG_DEBUG);


bingo you should see a logger in recent log messages

Please leave a comment if you like the article..

No comments:

Post a Comment