2

I am debugging some custom code on the live high traffic Magento 1.9 site.

I don't want to turn on logging in System > Configuration > Developer > Log Settings as the log file is filling up with messages so fast I can't see my debug message.

Is there a command that will log a message with logging turned off?

1 Answer 1

11
Mage::log('message',null,'logfile.log',true);

That will log message text in var/log/logfile.log no matter if logging is turned on or off.

2
  • Konstantin Gerasimov thank you for your prompt reply. Let me try that
    – Marina
    May 10, 2017 at 17:55
  • 2
    Maybe it is good to mention that the 4th parameters, which you set to true is used to force the log, no matter if development mode is true or not.
    – Niels
    May 11, 2017 at 7:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.