summaryrefslogtreecommitdiff
path: root/lib/Multi/Core.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Multi/Core.pm')
-rw-r--r--lib/Multi/Core.pm14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/Multi/Core.pm b/lib/Multi/Core.pm
index 7bffef52..82b3a9c6 100644
--- a/lib/Multi/Core.pm
+++ b/lib/Multi/Core.pm
@@ -122,13 +122,13 @@ sub run {
die "PID file already exists\n" if -e $pidfile;
$stopcv = AE::cv;
- AnyEvent::Log::ctx('Multi')->attach(AnyEvent::Log::Ctx->new(level => $VNDB::M{log_level}, log_to_file => $VNDB::M{log_dir}.'/multi.log'));
- #log_cb => sub {
- # open(my $F, '>>:utf8', $VNDB::M{log_dir}.'/multi.log');
- # print $F $_[0];
- # close $F;
- # }
- #));
+ AnyEvent::Log::ctx('Multi')->attach(AnyEvent::Log::Ctx->new(level => $VNDB::M{log_level}, # log_to_file => $VNDB::M{log_dir}.'/multi.log'));
+ # Don't use log_to_file, it doesn't accept perl's unicode strings (and, in fact, crashes on them without logging anything).
+ log_cb => sub {
+ open(my $F, '>>:utf8', $VNDB::M{log_dir}.'/multi.log');
+ print $F $_[0];
+ }
+ ));
$AnyEvent::Log::FILTER->level('fatal');
daemon_init;