################################################################################
# Logging
################################################################################

# Logger severity overrides

log4cplus.logger.netborder.sip.message=INFO 
log4cplus.logger.netborder.cpa=INFO

################################################################################

# DEVELOPMENT default loggers configuration. Use in DEVELOPMENT stage to ease troubleshooting
# Use either this or the one below
log4cplus.rootLogger=WARN, SYSTEMLOG_APPENDER, PRODUCTION_APPENDER, CALL_LOG_APPENDER
 
# PRODUCTION default logger configuration. Optimized for speed and long term maintenance.
# Avoid large files and big amount of files.
# Use either this or the one above
#log4cplus.rootLogger=WARN, SYSTEMLOG_APPENDER, PRODUCTION_APPENDER    

# DEBUG_APPENDER appender configuration
log4cplus.appender.DEBUG_APPENDER=log4cplus::FileAppender
log4cplus.appender.DEBUG_APPENDER.File=logs/call-analyzer-service.out
log4cplus.appender.DEBUG_APPENDER.ImmediateFlush=true
log4cplus.appender.DEBUG_APPENDER.layout=log4cplus::PatternLayout
log4cplus.appender.DEBUG_APPENDER.layout.ConversionPattern=%D{%Y-%m-%d %H:%M:%S:%%q} [%t] %p - %c : %m%n

# PRODUCTION_APPENDER
log4cplus.appender.PRODUCTION_APPENDER=log4cplus::DailyRollingFileAppender
log4cplus.appender.PRODUCTION_APPENDER.File=logs/call-analyzer-service.roll.out
log4cplus.appender.PRODUCTION_APPENDER.ImmediateFlush=true
log4cplus.appender.PRODUCTION_APPENDER.MaxBackupIndex=14
log4cplus.appender.PRODUCTION_APPENDER.Schedule=DAILY
log4cplus.appender.PRODUCTION_APPENDER.layout=log4cplus::PatternLayout
log4cplus.appender.PRODUCTION_APPENDER.layout.ConversionPattern=%D{%Y-%m-%d %H:%M:%S:%%q} [%t] %p - %c : %m%n

# SYSTEMLOG_APPENDER Config (Windows Event logger/syslog)
log4cplus.appender.SYSTEMLOG_APPENDER=log4cplus::NTEventLogAppender
log4cplus.appender.SYSTEMLOG_APPENDER.source=Sangoma NetBorder Call Analyzer
log4cplus.appender.SYSTEMLOG_APPENDER.layout=log4cplus::PatternLayout
# Ouput raw message only
log4cplus.appender.SYSTEMLOG_APPENDER.layout.ConversionPattern=%m

# Append only WARN/ERROR/FATAL logs in the systemlog
log4cplus.appender.SYSTEMLOG_APPENDER.filters.1=log4cplus::spi::LogLevelRangeFilter
log4cplus.appender.SYSTEMLOG_APPENDER.filters.1.LogLevelMin=WARN
log4cplus.appender.SYSTEMLOG_APPENDER.filters.1.LogLevelMax=FATAL
log4cplus.appender.SYSTEMLOG_APPENDER.filters.1.AcceptOnMatch=true
log4cplus.appender.SYSTEMLOG_APPENDER.filters.2=log4cplus::spi::DenyAllFilter

# SYSTEMLOG_ADMIN_APPENDER: informational messages for the admin
log4cplus.logger.netborder.admin=INFO, SYSTEMLOG_ADMIN_APPENDER
log4cplus.appender.SYSTEMLOG_ADMIN_APPENDER=log4cplus::NTEventLogAppender
log4cplus.appender.SYSTEMLOG_ADMIN_APPENDER.source=Sangoma NetBorder Call Analyzer
log4cplus.appender.SYSTEMLOG_ADMIN_APPENDER.layout=log4cplus::PatternLayout
# Ouput message only
log4cplus.appender.SYSTEMLOG_ADMIN_APPENDER.layout.ConversionPattern=%m

# Call Logging
log4cplus.appender.CALL_LOG_APPENDER=log4cplus::NullAppender
log4cplus.appender.CALL_LOG_APPENDER.Directory=logs/call-logs
log4cplus.appender.CALL_LOG_APPENDER.ImmediateFlush=true
log4cplus.appender.CALL_LOG_APPENDER.layout=log4cplus::PatternLayout
log4cplus.appender.CALL_LOG_APPENDER.layout.ConversionPattern=%D{%Y-%m-%d %H:%M:%S:%%q} [%t] %p - %c : %m%n
# Set to true if you want a directory structure with
# year/month/day/hour for your call logs
netborder.infra.CallLogger.dateTimeDirectory=true

# CPASTATS
log4cplus.appender.CPA_STATS=log4cplus::DailyRollingFileAppender
log4cplus.appender.CPA_STATS.File=logs/cpa-stats.csv
log4cplus.appender.CPA_STATS.Schedule=DAILY
log4cplus.appender.CPA_STATS.layout=log4cplus::PatternLayout
log4cplus.appender.CPA_STATS.layout.ConversionPattern=%m%n
log4cplus.appender.CPA_STATS.FileHeader=Netborder-NCA Statistics File Version 2.0\nNetborder Call-id,Call Date,Reference ID,Campaign Name,Phone Number,NCA Engine Result,Time Dialing,Time Connected,Time NCA Engine Completed,Time Queued,Time Connected to Agent,Detailed Cpd Result
log4cplus.logger.netborder.cpa.stats=INFO, CPA_STATS
