質問

Is there any way to delete old logs in log4php? Or logs gets deleted after specific time duration?

役に立ちましたか?

解決

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) or LoggerAppenderDailyFile (created a new file based on the time).

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top