Subject: | Not all Log::Dispatch::File options are respected |
Because Log::Dispatch::Binlog::File completely overrides log_message(), not every option is respected, e.g. 'syswrite'.
It should call the parent to handle all the options:
use base 'Log::Dispatch::File'; # Log::Dispatch::Binlog::Base not needed
use Storable 'nstore';
sub log_message
{
my ($self, %p) = @_;
$self->SUPER::log_message(
%p,
message => nstore $p{message},
);
}
(I'm fixing some underlying issues in Log::Dispatch::File at the moment, and looking at all existing subclasses on the cpan.)