From: Martin E. <mar...@ea...> - 2007-02-23 16:16:19
|
I forgot to say when I used "permissions" to set 0666 with Log::Dispatch::FileRotate I only ssaw the log output from the first process. Martin -- Martin J. Evans Easysoft Limited http://www.easysoft.com Martin Evans wrote: > Hi, > > I've been using Log::Log4perl for ages now in a set of CPAN modules we > wrote and internally in a project here. All has been ok, it works well - > thank you. > > This issue is mostly related to Log::Dispatch::FileRotate|File but I am > posting here since I may need advice on an alternative. > > Our log files are getting pretty large and after seeing a post on this > list I decided to try Log::Dispatch::FileRotate. It seemed to work fine > at first. The logging is in a single module, this module is used in > multiple places/processes under different uids and we have a single > config file. One of the places is code running under modperl, the other > is a daemon in perl. > > The first problem was due to umasks and first to start (the daemon or > modperl) created the file and the other couldn't open it. I tried > > log4perl.appender.X1.umask = sub { 0000 } > > but it would seem Log::Dispatch::FileRotate does not know umask. I then > discovered "permissions" so did: > > log4perl.appender.X1.permissions = sub { 0666 } > > and this appears to work until another uid comes along in which case you > get: > > Cannot chmod /tmp/dbix.log to 438: Operation not permitted at > /usr/lib/perl5/site_perl/5.8.8/Log/Dispatch/File.pm line 96 > > I don't get this as Log::Dispatch::File says: > > "If the file does not already exist, the permissions that it should be > created with." > > so I presume this is a bug. > > Am I wasting my time here? Would I be better going back to > Log::Log4perl::Appender::File, using ".umask" and some external file > rotator? Any recommendations? > > Martin |