Share icon
watchdog d7

hey, For many purpose we have to print the array or object while making a custom modules or debuging any old module, we have to print the array or object to see the values are fine or not, drupal provide a way to see those using watchdog, But how we print array or object in watchdog function, Answer is below.

watchdog("any_word_you_like", '<pre>' . print_r( $your_object_variable, true) . '</pre>');

Now, execute your function or page whenever you right it.

Then go to - https://yourdomian/admin/reports/dblog

Then go to - https://yourdomian/admin/reports/dblog

Note - Make sure module "Database logging (dblog)" is on then only you can see the above page.


Please Comment your thoughts and feedback below and add something if you found good in anywhere to help others

Hit a like Button If you like the Post.

Many Thanks

Comments

Profile picture for user kassandraspear6603821
fredricdore8712 (not verified)
27 Jun 2022
Today, I went to the beach with my children. I found a sea shell and gave it to my 4 year old daughter and said "You can hear the ocean if you put this to your ear." She placed the shell to her ear and screamed. There was a hermit crab inside and it pinched her ear. She never wants to go back! LoL I know this is totally off topic but I had to tell someone!
Profile picture for user kassandraspear6603821
alfieokeefe5893 (not verified)
27 Jun 2022
Write more, thats all I have to say. Literally, it seems as though you relied on the video to make your point. You definitely know what youre talking about, why waste your intelligence on just posting videos to your site when you could be giving us something informative to read?
Profile picture for user kassandraspear6603821
xbhfrederic092920 (not verified)
27 Jun 2022
Heya i am for the first time here. I came across this board and I in finding It really useful & it helped me out much. I hope to present something back and help others like you aided me.
Profile picture for user kassandraspear6603821
mohamed.halmey… (not verified)
27 Jun 2022
Thank you so much for this line. After 5 days of searching. I found the needed one. May Allah bless you and your family.

Add new comment

Restricted HTML