From: Mike S. <m...@pe...> - 2007-02-23 21:16:04
|
On Fri, 23 Feb 2007, Martin Evans wrote: > 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. Excellent, thanks for sharing! > but it would seem Log::Dispatch::FileRotate does not know umask. That's a feature that I think needs to be added to Log::Dispatch::FileRotate, similar to what Log::Log4perl::Appender::File does. FileRotate's author has been known to read this mailing list, so maybe it'll come soon :). That being said, there's situations where processes are running as different users, and all of them are writing to the same logfile. To avoid permission problems in this scenario (think about what happens when one user triggers the rotation), I've found it easiest to use an external rotator instead. Log::Logperl supports this as well: http://log4perl.sourceforge.net/d/Log/Log4perl/FAQ.html#2d0d0 -- Mike Mike Schilli m...@pe... > 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 > -- > Martin J. Evans > Easysoft Limited > http://www.easysoft.com > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > log4perl-devel mailing list > log...@li... > https://lists.sourceforge.net/lists/listinfo/log4perl-devel > |