vmraj has asked for the wisdom of the Perl Monks concerning the following question:
I have a perl daemon script which is using Log4perl module to log messages.
When the log file contents are cleared (eg: during when the log is rotated), the script is not writing log messages into it.
Note: Log file is given full access priviledge.
Sample script:
Thanks
Note: Log file is given full access priviledge.
Sample script:
Any pointers on how to resolve this issue ?#!/usr/local/bin/perl use strict; use warnings; use Log::Log4perl qw(:easy); my $logfile = '/home/y/logs/mylogger.log'; Log::Log4perl->easy_init({ level => $DEBUG, file => ">>$logfile", layout => "%d %F{1}-%L: %m%n" }); my $i = 1; while($i <= 50) { DEBUG "This is a log message"; sleep(10); }
Thanks
Back to
Seekers of Perl Wisdom