Switching Log API

This section shows you how to switch to SLF4J in scenarios where you want to use Log4j as a backend API to continue using any pre-PB201607 configuration.

PB201607 TAFJ runtime gives you the ability to use SLF4J as a façade. SLF4J gives you the option to select the logging backend framework at deployment time.

Setting up the Classpath

You need to make some modifications in the classpath to use SLF4J and Log4j 1.2.

Procedure

  1. Remove log4j-api.jar and log4j-core.jar from the <TAFJ_HOME>\lib directory.
  2. Add the following JARs in the <TAFJ_HOME>\lib directory:
    • <TAFJ_HOME>\3rdParty\logging\slf4j\slf4j-api.jar
    • <TAFJ_HOME>\3rdParty\logging\slf4j\slf4j.log4j12.jar
    • <TAFJ_HOME>\3rdParty\logging\log4j12\log4j.jar

Setting up Runtime

Procedure

  1. Set the following system property through JVM argument using the appserver mode to switch from native Log4j2 API to SLF4J:

    -Dtemenos.log.api=SLF4J

    TIPS:

    You can set the above system property through environment variables (standalone mode tafj shell) as follows:

    • For Linux - export temenos_log_api =SLF4J
    • For Windows - set temenos.log.api=SLF4J

  2. Set the following system property through JVM argument using the appserver mode to switch from backend API (behind SLF4J) to Log4j 1.2:

    -Dtemenos.log.backend=LOG4J

    TIPS:

    You can set the above system property through environment variables (standalone mode tafj shell) as follows:

    • For Linux - export temenos_log_backend =LOG4J
    • For Windows - set temenos.log.backend=LOG4J
    NOTE: The default value of this system property is LOG4J2. It should be set up at TAFJ start up through environment variables or JVM arguments.

Bookmark Name Actions
Feedback
x