diff options
author | Yorhel <git@yorhel.nl> | 2015-04-27 18:41:18 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2015-04-27 18:41:31 +0200 |
commit | b41e61bb5acf7591a16212d5cfb17e0f809a15f7 (patch) | |
tree | 1577ec77ada543fe81a736bc453bac5b0e5a09d7 | |
parent | 03a27d8ece859af9cd1c27035a8e4feec415a9de (diff) |
Multi::Core: Make log level configurable
I probably don't want to have the 'trace' log level on the actual
server.
-rw-r--r-- | data/global.pl | 1 | ||||
-rw-r--r-- | lib/Multi/Core.pm | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/data/global.pl b/data/global.pl index cf9a9fd4..6da363c1 100644 --- a/data/global.pl +++ b/data/global.pl @@ -119,6 +119,7 @@ our %S = (%S, # Multi-specific options (Multi also uses some options in %S and %O) our %M = ( log_dir => $ROOT.'/data/log', + log_level => 'trace', modules => { #API => {}, # disabled by default, not really needed #APIDump => {}, diff --git a/lib/Multi/Core.pm b/lib/Multi/Core.pm index 3244927e..7bffef52 100644 --- a/lib/Multi/Core.pm +++ b/lib/Multi/Core.pm @@ -122,7 +122,7 @@ sub run { die "PID file already exists\n" if -e $pidfile; $stopcv = AE::cv; - AnyEvent::Log::ctx('Multi')->attach(AnyEvent::Log::Ctx->new(level => 'trace', log_to_file => $VNDB::M{log_dir}.'/multi.log')); + 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]; |