tags:

views:

25

answers:

1

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

+3  A: 

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.

mabwi
upvoted for finding your own solution, then coming back to answer your own question. Nice work!
Travis Leleu