[Dancer-users] Allow alternate path in Dancer::Logger::File?
Mike Schroeder
mike at donor.com
Wed Oct 27 20:11:07 CEST 2010
Currently the logdir() method in Dancer::Logger::File looks like:
sub logdir {
my $appdir = setting('appdir');
my $logroot = $appdir || File::Spec->tmpdir();
return path($logroot, 'logs');
}
However, our production environments all mount off read-only
filesystems, so having logging dependant on appdir won't work. I can
write a new logger module that does something like:
sub logdir {
my $appdir = setting('appdir');
my $altpath = setting('log_path');
my $logroot = $appdir || File::Spec->tmpdir();
return ( $altpath ? $altpath : path($logroot, 'logs') );
}
Is that something that is worth going into the core? I'm fine either way,
but I thought this might be useful to others in the future.
Thanks.
Mike.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.backup-manager.org/pipermail/dancer-users/attachments/20101027/acb47d30/attachment.htm>
More information about the Dancer-users
mailing list