As you may know according to the default configuration of CakePHP the debug and error log is generated in the same file. But this can be changed in a few simple steps. All you have to do is following.
- Got to config/app.php
- Find the ‘Log’ configuration array
- In both debug and error replace the ‘file’ with “’debug-‘ . date(‘Y-m-d’),” and “’error-‘ . date(‘Y-m-d’),” respectively
- Save the file and you are good to go.
Now, the log will be generated on a daily basis.
Top comments (2)
thanks, Ankush. I also shifted to laravel quite some time ago. This was my work when I use to work on CakePHP. I have also created a CakePHP plugin for smooth log reading. Here is the link. I am thinking of putting an article about it in a day or two.
BTW thanks again.
Good post.
Aguante CakePHP.