Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mage::log() function not working

Tags:

magento

My Mage::log() function is not working. The var/log folder is 777 and logging is enabled from the admin panel. Still I am unable to log anything

like image 421
zomato Avatar asked Jun 21 '26 11:06

zomato


2 Answers

What are you logging?

Here's a few things to consider:

  1. Are you sure that your log function is being executed? Put a die() statement after your code to test that it executes.
  2. Ensure that you have the proper parameters for the Mage::log() function.
  3. Clear or disable your cache.
  4. If compilation mode is turned on, disable or re-compile.
like image 110
df2k2 Avatar answered Jun 25 '26 20:06

df2k2


You could give this call a try:

Mage::log("My test log", null, "test.log")

The last parameter is the name of the log file, which you will find in the folder under path '%MAGENTO_BASE%/var/log/'

I hope this helps!

like image 28
byebb Avatar answered Jun 25 '26 20:06

byebb



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!