I have a couple of processes that do a lot of logging that I would not like
a part of the main application's log file, but when I setup multiple
loggers, they also seem to log to the same place.
# primary logger that logs to log/log1.log
my $logger1 = MojoX::Log::Log4perl->new( \$config1 );
$self->log($logger1);
# secondary logger for maint tasks should log to log/log2.log
my $logger2 = MojoX::Log::Log4perl->new( \$config2 );
$self->helper(log2 => sub { $logger2 });
# Instead of going to logs log1.log and log2.log respectively, they
# both go to log1.log
$self->app->log->info("this should be in log 1 but not log 2");
$self->app->log2->info("this should be in log 2 but not in log 1");
How do I enable multiple loggers?
--
You received this message because you are subscribed to the Google Groups
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.