in reply to Proc::Daemon logging issue - log only populates on daemon exit
I guess killing the program closes the file-handle and flushes the buffer.
Yes, but you can flush without closing the file or terminating the program:
use IO::Handle; ... open LOG ... LOG->autoflush(); # or flush manually as needed: ... LOG->flush();
(Note that $| = 1 applies to the currently selected handle, which is not LOG, unless you explicitly select it (by default it's STDOUT).)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Proc::Daemon logging issue - log only populates on daemon exit
by tizatron (Novice) on Dec 14, 2010 at 21:48 UTC |