The samples are contained in the log4j.properties file itself (which is located in the "conf" directory of the installed JTAPI SDK). Scenario D provides a rotating log example.
# # # # # # #
# # Scenario D: trace to 16 rotating files 50MB each with fine grained logs enabled (Threshold set to ALL), errors to jtapiErrors.log, no msgs to root logger
# #
# Specify trace and error destinations
# do not permit data to flow also up to root logger.
#log4j.logger.com.avaya.jtapi=ALL, JTAPI_TRACE_APPENDER, JTAPI_ERROR_APPENDER
#log4j.additivity.com.avaya.jtapi=false
# trace data going to a set of rolling files: (1 'current' and 15 'backup'):
# current is always JTAPI_trace.txt;
# backup rolls through JTAPI_trace.txt.1, ... JTAPI_trace.txt.15
#log4j.appender.JTAPI_TRACE_APPENDER.Threshold=ALL
#log4j.appender.JTAPI_TRACE_APPENDER=org.apache.log4j.RollingFileAppender
#log4j.appender.JTAPI_TRACE_APPENDER.File=${user.home}/JTAPI_trace.txt
#log4j.appender.JTAPI_TRACE_APPENDER.layout=org.apache.log4j.PatternLayout
#log4j.appender.JTAPI_TRACE_APPENDER.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
#log4j.appender.JTAPI_TRACE_APPENDER.MaxFileSize=50MB
#log4j.appender.JTAPI_TRACE_APPENDER.MaxBackupIndex=15
# error data going to the default file.
#log4j.appender.JTAPI_ERROR_APPENDER=org.apache.log4j.FileAppender
#log4j.appender.JTAPI_ERROR_APPENDER.Threshold=ERROR
#log4j.appender.JTAPI_ERROR_APPENDER.File=jtapiErrors.log
#log4j.appender.JTAPI_ERROR_APPENDER.layout=org.apache.log4j.PatternLayout
#log4j.appender.JTAPI_ERROR_APPENDER.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
# #
# # Scenario D End
# # # # # # #
|