1

My sysadmin has been "encouraging" me to fix our web application logs to play nicely with logrotate. The problem is that after logrotate works on a file the application stops logging. Is there a way to configure log4j to reopen log files after this happens?

This comment explains the general problem but doesn't provide a solution for log4j: https://stackoverflow.com/a/6514233/201748

Community
  • 1
  • 1
samspot
  • 595
  • 1
  • 11
  • 24

1 Answers1

2

I have still to test it, but the copytruncate option of logrotate should do.

S19N
  • 133
  • 5
  • Yes this is correct. When I finally solved the issue I forgot about my SO question. Our problem was some other bad config that was causing logrotate to ignore rules. – samspot Apr 18 '13 at 20:51