Author Message
Sushil
Joined: Sep 13, 2020
Messages: 17
Offline
Hi,
We are using JTAPI client library ecsjtapia-8.1.3.5.0.6.jar in our application. Below are the start up sequences
  • Application starts

  • Initializes logger (log4j-core-2.17.0.jar and log4j-api-2.17.0.jar)

  • Initializes JTAPI Provider


  • Before Provider Initialization, application keep writing logs, but as soon as JTAPI Provider initialization starts, application logger stops printing all the log statements, but JTAPI keep printing log statements in its trace logs.

    It looks that internally JTAPI re-configures the logger which resets our application logger.
    Below are the TSAPI.pro file FYR.

    172.28.20.25=450
    
    debugLevel=7
    traceLoggerLevel=7
    altTraceFile=/var/logs/Trace/jtapiTrace.txt


    Am I missing any configuration here?
    LotharBrandl
    Joined: Nov 6, 2013
    Messages: 10
    Offline
    The same behavior by me with ecsjtapia-8.1.3.5.0.6.jar and log4j2 - 2.18.0
    Sushil
    Joined: Sep 13, 2020
    Messages: 17
    Offline
    Hi LotharBrandl,
    I also tried with log4j2.18.0 but the same behavior. Are you able to solve this issue?
    LotharBrandl
    Joined: Nov 6, 2013
    Messages: 10
    Offline
    Hi Sushil,
    I done some tests and printed out in my servlet app the loggers. There I was able to see that first my two loggers JTAPI, STDOUT where active and after init JTAPI they are away and only the JTAPITRaceFile & DefaultConsole-2 exists. The ecsjtapia create a new logger environment and build that - insteade of use the existing and extend it.
    The only workaround I found was to extend the ecsjtapia logger after first load of them by get the current LoggerContext
    LoggerContext ctx = (LoggerContext) LogManager.getContext(false);
    Configuration config = ctx.getConfiguration();
    create my layout, policy, fileAppender, refs, loggerConfg and update the current logger by
    ctx.updateLoggers();
    Sushil
    Joined: Sep 13, 2020
    Messages: 17
    Offline
    Thanks LotharBrandl for quick reply.
    Let me check if it is possible.
    LotharBrandl
    Joined: Nov 6, 2013
    Messages: 10
    Offline
    This worked by me - but s not my "wish-design"
    MartinFlynn
    Joined: Nov 30, 2009
    Messages: 1829
    Offline
    According to the JTAPI programmers guide, the debugLevel setting in TSAPI.PRO will override the log4j settings file. It may be worth while commenting out the debugLevel line in TSAPI.PRO and using conf/log4j.properties to enable JTAPI tracing. There is more information in the JTAPI PG.

    Martin
    LotharBrandl
    Joined: Nov 6, 2013
    Messages: 10
    Offline
    If I comment out debug in TSAPI pro then by ecsjtapia the rootLogger is disabled -> Level.OFF. Ths ends also in overwrite my current loggers. Also some missleading infos are printed out by ecsjtapia :
    log4j:WARN No appenders could be found for logger (com.avaya.jtapi.tsapi.util.JTAPILoggingAdapter).
    log4j:WARN Please initialize the log4j system properly.


    If I then use log4j2.properties from java-jdk/conf I initially get logging messages and after JTAPI is running the logger config is overwritten and empty again.
    Sushil
    Joined: Sep 13, 2020
    Messages: 17
    Offline
    Exactly same behavior with me as well.
    Below is the statements form TSAPI.PRO file and in log4j.properties I enabled Scenario D

    172.28.230.125=450
    #debugLevel=7
    traceLoggerLevel=7

    Note: We are using JTAPI lib in web application which is running on tomcat 9 with OpenJDK 11[i]
    Sushil
    Joined: Sep 13, 2020
    Messages: 17
    Offline
    Hello Martin Flynn,
    Could you please suggest anything on it?
    MartinFlynn
    Joined: Nov 30, 2009
    Messages: 1829
    Offline
    I asked the product house to take a look at this and they agree that the JTAPI client is not operating correctly here. There will be a fix in a subsequent version of JTAPI.

    In the mean time they suggest that you should re-initialize the application side logger after JTAPI session is created.

    Martin
    Sushil
    Joined: Sep 13, 2020
    Messages: 17
    Offline
    Thanks a lot Martin for this update.
    MartinFlynn
    Joined: Nov 30, 2009
    Messages: 1829
    Offline
    I have opened MR AES-30104 for this.

    Martin
    Sushil
    Joined: Sep 13, 2020
    Messages: 17
    Offline
    Thanks a lot Martin.
    Sushil
    Joined: Sep 13, 2020
    Messages: 17
    Offline
    Hi Martin,
    When can we expect JTAPI fix?
    Is there any timeline available?
    Go to:   
    Mobile view