Jump to content

Where can I find where CakePHP logs errors?


ballhogjoni

Recommended Posts

I am new to CakePHP. I have checked app/tmp/logs/*.log for errors but nothing is logging there. I checked my apache error log, but nothing there. I checked php.ini for where the errors are being logged but that section is commented out. I checked my virtual host for error logging but nothing in my virtual host. I know there are server side errors because my browser gets a 500 internal server error.

 

Where are the errors being logged? How do I find this out?

If what you say is true, no php error logging and no apache error logging, then there isn't any logging happening.  Enable both.  PHP's error_log should always be setup, even in a production environment, but especially in a development one.  Apache's error log should also be on, it can be a helpful diagnostic aid.  Cake's builtin logging only occurs when you use it. 

Apache Error Logging. Put it in your <VirtualHost>

ErrorLog "relative/path/to/your/site/error.log"

 

PHP Error Logging The php.ini is pretty well documented too.

log_errors = true
error_log = "/path/to/your/error_log"

 

All cakephp classes derived from Object class have a log method.  Most of the time its a matter of $this->log("Hello World.");

thanks for the help thehippy

 

I saw this $this->log("Hello World."); in the docs but couldn't ever get it to log. This is on of the major reasons for this thread. I add this on the first line of the __construct function to the dispatcher class, I tail app/tmp/logs/*.log (error.log and debug.log) and I don't get any output.

 

What am I missing?

 

Thanks

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.