forked from openfoodfacts/openfoodfacts-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
log.conf
19 lines (13 loc) · 1.03 KB
/
log.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
log4perl.rootLogger=ERROR, LOGFILE
log4perl.logger.mongodb=INFO, MONGODB_LOGFILE
log4perl.PatternLayout.cspec.S = sub { my $context = Log::Log4perl::MDC->get_context; use Data::Dumper (); local $Data::Dumper::Indent = 0; local $Data::Dumper::Terse = 1; local $Data::Dumper::Sortkeys = 1; local $Data::Dumper::Quotekeys = 0; local $Data::Dumper::Deparse = 1; my $str = Data::Dumper::Dumper($context); $str =~ s/[\n\r]/ /g; return $str; }
log4perl.appender.LOGFILE=Log::Log4perl::Appender::File
log4perl.appender.LOGFILE.filename=./logs/log4perl.log
log4perl.appender.LOGFILE.mode=append
log4perl.appender.LOGFILE.layout=PatternLayout
log4perl.appender.LOGFILE.layout.ConversionPattern=[%r] %F %L %c %S %m{chomp}%n
log4perl.appender.MONGODB_LOGFILE=Log::Log4perl::Appender::File
log4perl.appender.MONGODB_LOGFILE.filename=./logs/mongodb_log4perl.log
log4perl.appender.MONGODB_LOGFILE.mode=append
log4perl.appender.MONGODB_LOGFILE.layout=PatternLayout
log4perl.appender.MONGODB_LOGFILE.layout.ConversionPattern=[%r] %F %L %c %S %m{chomp}%n