1

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?

7
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.

  • Konstantin Gerasimov thank you for your prompt reply. Let me try that – Marina May 10 '17 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 '17 at 7:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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