By changing /Cake/Log/Engine/Filelog.php‘s write function I can change “error.log” and “debug.log” file names.
Is there any way to change these file names without hacking CakePHP 2 core files.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In your comment above, you said that the reason you’re wanting to change the names of these log files is because the files in question have no size limitations. The thing is: If you have an error log that is 2MB in size, then you’ve clearly got bigger fish to fry. As far as I know, there is no way to change those file names without hacking the core. If you’re really worried about the size of those two log files, then you could setup a cronjob that checks the size of those two files every 24 hours. If the log file size is bigger than the predetermined limit that you’ve set, you could send an alert email to yourself. To be honest: The best approach to take is to test your application extensively beforehand so that any entry in those two files becomes a surprise instead of a routine.