Author Message
PraveenGopi
Joined: Sep 5, 2014
Messages: 31
Offline
Customer is worried enabling the JTAPI traces to DEBUG level =7
I am referring the JTAPI programmer's guide to get the DEBUG level enabled - it reads about setting in log4j properties. But could I get the instructions on how to do so.

The samples provide a log4j.properties file which contains four different commonly used
configurations of log4j as examples. In all scenarios, the root appender is configured as a console
appender.
Configuration Description
A In this case, only messages of level “error” and worse are logged to files named
jtapiErrors.log.n, where n is a number from 1 to 15. Use of each file as a log
destination is discontinued once the file size hits 50 MB and the next file starts
getting used. Please note that this is the recommended level of logging that
should be enabled by default by all client applications

Basically on how to get the logs rotated till the issue is logged?
MichaelHerman2
Joined: Jan 9, 2014
Messages: 102
Offline
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
# # # # # # #
Go to:   
Mobile view