I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2008-08-28 19:14:43-07 by ssinyagin
reopening STDERR in parent process
The Torrus collector reopens STDERR upon SIGHUP: Line 113 in source
my $rotateLogs = sub { Info('Caught SIGHUP. Reopening log file'); close( STDERR ); open( STDERR, ">>$logfile" ); $| = 1; };
After assigning this signal handler, the collector spawns a child thread. The child prints its debugging and error messages to STDERR. The problem appeared that when the logfile is moved and SIGHUP is sent to the process, only the parent process starts to write to the new file. The child thread continues writing to the old file.

How can I organize the logging so that the file rotation is still possible? Would log4perl be of any help?
Direct Responses: 8689 | Write a response