Is there any way to delete old logs in log4php? Or logs gets deleted after specific time duration?
Share
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.
If you use the plain
LoggerAppenderFile, then it is up to you to rotate the logfiles, which might be a good thing because it can be done without any impact on the running PHP application.If you want log4php to do this, use either the
LoggerAppenderRollingFile(creates a new logfile after a certain size, and deletes the oldest rotated) orLoggerAppenderDailyFile(created a new file based on the time).