diff options
author | Yorhel <git@yorhel.nl> | 2015-05-11 13:16:56 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2015-05-11 13:16:56 +0200 |
commit | 89d3405ac83145f0d7a27db37fcc835bdc2948d2 (patch) | |
tree | b489b68eb759034f26489c6364a9a174235d99c8 /lib/Multi/Core.pm | |
parent | f520f6209cd4e0ca603ae1c79c02fbcbe68dec3f (diff) |
Multi::{Core,Anime}: More fixes regarding UTF-8
Diffstat (limited to 'lib/Multi/Core.pm')
-rw-r--r-- | lib/Multi/Core.pm | 14 |
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; |