I have a CakePHP application that uses a number of vendor classes, including one to handle email. We're having some issues with emails not arriving, so we want to add a log message every time an email gets sent. The obvious place to do that is in the send function of the email class, but $this->log doesn't work, since the vendor object isn't built on the CakePHP one.
Is there anyway to access the CakePHP logging system from a non-CakePHP class?
Thanks in advance
I found a hint at this on another site. The solution is
Debugger::log()
Some further details, since I ran in to a problem while doing this. Your debug level needs to be greater than zero or you get a white screen.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With