http://www.perlmonks.org?node_id=1004162


in reply to Log4perl log rotation in threadpool environment

Maybe you can:

  1. copy the existing log file to a new name
    e.g. copy log_file to log_file.2012-11-16
  2. truncate the log file
  3. Optionally zip the archive file

That way the file handle for the log file doesn't change.

A Monk aims to give answers to those who have none, and to learn from those who know more.