ballhogjoni Posted October 7, 2010 Share Posted October 7, 2010 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? Link to comment https://forums.phpfreaks.com/topic/215371-where-can-i-find-where-cakephp-logs-errors/ Share on other sites More sharing options...
thehippy Posted October 7, 2010 Share Posted October 7, 2010 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. Link to comment https://forums.phpfreaks.com/topic/215371-where-can-i-find-where-cakephp-logs-errors/#findComment-1120018 Share on other sites More sharing options...
ballhogjoni Posted October 8, 2010 Author Share Posted October 8, 2010 Cake's builtin logging only occurs when you use it. how do you use it? I've read the docs and have implemented it or so I thought. Also, will you show me how to enable both? Link to comment https://forums.phpfreaks.com/topic/215371-where-can-i-find-where-cakephp-logs-errors/#findComment-1120058 Share on other sites More sharing options...
thehippy Posted October 8, 2010 Share Posted October 8, 2010 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."); Link to comment https://forums.phpfreaks.com/topic/215371-where-can-i-find-where-cakephp-logs-errors/#findComment-1120123 Share on other sites More sharing options...
ballhogjoni Posted October 8, 2010 Author Share Posted October 8, 2010 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 Link to comment https://forums.phpfreaks.com/topic/215371-where-can-i-find-where-cakephp-logs-errors/#findComment-1120223 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.