PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, January 16, 2022

[FIXED] CakePHP change error.log or debug.log file name

 January 16, 2022     cakephp, cakephp-2.0, php     No comments   

Issue

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.


Solution

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.



Answered By - Wayne Whitty
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing