#
# Log4perl configuration example file to the IPTV-analyzer
#  iptv-collector daemon
#

log4perl.logger              = DEBUG, Screen1
log4perl.logger.IPTV.Analyzer = INFO, File1


# Output: Screen1
# ---------------
#  log4perl.appender.Screen1      = Log::Log4perl::Appender::Screen
log4perl.appender.Screen1         = Log::Log4perl::Appender::ScreenColoredLevels
#
# Don't print to STDERR because in the daemon
# we TIE STDERR from other programs to log4perl
log4perl.appender.Screen1.stderr  = 0
#  log4perl.appender.Screen1.Threshold = WARN
# log4perl.appender.Screen1.layout  = Log::Log4perl::Layout::SimpleLayout
log4perl.appender.Screen1.layout  = Log::Log4perl::Layout::PatternLayout
log4perl.appender.Screen1.layout.ConversionPattern = %d [%P] %c %p>	%m%n

# Output: File1
# -------------
log4perl.appender.File1          = Log::Log4perl::Appender::File
log4perl.appender.File1.filename = /var/log/tvprobe.log
log4perl.appender.File1.mode     = append
log4perl.appender.File1.umask    = 0002
# log4perl.appender.File1.Threshold = WARN
#  log4perl.appender.File1.Additivity = 0
#  log4perl.appender.File1.mode     = write
#  log4perl.appender.File1.binmode  = ":utf8"
#  log4perl.appender.File1.layout   = Log::Log4perl::Layout::SimpleLayout
log4perl.appender.File1.layout  = Log::Log4perl::Layout::PatternLayout
log4perl.appender.File1.layout.ConversionPattern = %d [pid:%P] %C %l %p>	%m%n
#  log4perl.appender.File1.layout.ConversionPattern = %d [pid:%P] %c %l %p>\t%m%n
#  log4perl.appender.File1.layout.ConversionPattern = %d [pid:%P] %c [file:%F{1}] %p>\t%m%n


# Emailing log messages over a given level
# --------
log4perl.category = FATAL, Mailer
log4perl.appender.Mailer         = Log::Dispatch::Email::MailSend
log4perl.appender.Mailer.Threshold = ERROR
log4perl.appender.Mailer.to      = netoptimizer@brouer.com
log4perl.appender.Mailer.subject = FAILURE in mpeg2ts iptv-collector daemon
log4perl.appender.Mailer.layout  = SimpleLayout
#log4perl.appender.Mailer.buffered = 0


# http://search.cpan.org/~mschilli/Log-Log4perl-1.04/lib/Log/Log4perl/Layout/PatternLayout.pm
#
# layout.ConversionPattern:
# ------------------------
#  %c Category of the logging event.
#  %C Fully qualified package (or class) name of the caller
#  %d Current date in yyyy/MM/dd hh:mm:ss format
#  %F File where the logging event occurred
#  %H Hostname (if Sys::Hostname is available)
#  %l Fully qualified name of the calling method followed by the
#     callers source the file name and line number between
#     parentheses.
#  %L Line number within the file where the log statement was issued
#  %m The message to be logged
#  %M Method or function where the logging request was issued
#  %n Newline (OS-independent)
#  %p Priority of the logging event
#  %P pid of the current process
#  %r Number of milliseconds elapsed from program start to logging
#     event
#  %T A stack trace of functions called
#  %x The topmost NDC (see below)
#  %X{key} The entry 'key' of the MDC (see below)
#  %% A literal percent (%) sign
