You are on page 1of 21

TAFJ-Lo g gi n g

R20
TAFJ-Lo g gi n g

Amendment History:

Revisio
Date Amended Name Description
n
1 30th March 2019 TAFJ team Initial version
2 25th March 2020 S. Sakthi R20 AMR Review

Page 2
TAFJ-Lo g gi n g

Table of Contents
Copyright................................................................................................................................................ 4
Errata and Comments............................................................................................................................ 4
Logger.................................................................................................................................................... 5
Log api customization............................................................................................................ 5
Default configuration.......................................................................................................... 5
Switching log API............................................................................................................... 7
Backward compatibility, keep using log4j 1.2 natively....................................................... 8
Log folders customization.................................................................................................... 10
Logging COMO................................................................................................................... 11
Routing and file appender................................................................................................ 11
Socket appender and routing and file appender.............................................................. 12
Logger context..................................................................................................................... 14
Log redirect for Splunk........................................................................................................ 15
Multi-Tenant Logging............................................................................................................................ 16
Details of Log Types in TAFJTrace...................................................................................................... 17

Page 3
TAFJ-Lo g gi n g

Copyri g h t
Copyright © Temenos Headquarters SA 2009-2020. All rights reserved.
This document contains proprietary information that is protected by copyright. No part of this document may
be reproduced, transmitted, or made available directly or indirectly to a third party without the express
written agreement of TEMENOS UK Limited. Receipt of this material directly TEMENOS UK Limited
constitutes its express permission to copy. Permission to use or copy this document expressly excludes
modifying it for any purpose, or using it to create a derivative therefrom.

Errat a and Com m e n t s


If you have any comments regarding this manual or wish to report any errors in the
documentation, please document them and send them to the address below:
Technology Department

Temenos Headquarters SA
2 Rue de l’Ecole-de-Chimie,
CH - 1205 Geneva,
Switzerland

Tel SB: +41 (0) 22 708 1150


Fax: +41 (0) 22 708 1160

Please include your name, company, address, and telephone and fax numbers, and email
address if applicable. TAFJdev@temenos.com

Page 4
TAFJ-Lo g gi n g

Log g e r
T24 execution and TAFJ internal behavior could be monitored with logs.

Standard logging APIs (SLF4J, Log4J 1.2, Log4J 2.x) are used and a default logger
configuration, writing to files is provided within:

<TAFJ_HOME>\conf\TAFJTrace.properties.

This configuration could be either a Log4J 1.2 or Log4J2 configuration, depending either on
your TAFJ version or on the runtime configuration.

This file is generated automatically in the appropriate Log4j 1.2 or Log4j 2 format if it’s not
already existing.

The configuration allows:

- Changing the default log level for all loggers.

- Defining new loggers and appenders.

For more information please refer to the appropriate logging API documentation, links are
provided in the related section.

By default, several different loggers are defined, providing information related to a specific
topic: T24, Database, Runtime, MDB, EJB, etc…

Log api cu s t o m i z a t i o n

Defa u l t con fi g u r a t i o n
The default runtime configuration is making use natively either of Log4j 1.2 or Log4j 2.

Since PB201607 (June 2016 release), historical Log4j 1.2 configuration is switched to Log4j
2.

When upgrading from an existing installation to PB201607 and higher, any older existing
TAFJTrace.properties will be overridden to fit Log4j 2 format.

For backward compatibility this is still possible to use Log4j 1.2, but not recommended as
further logging enhancements are not going to be supported with this log4j version.

Page 5
TAFJ-Lo g gi n g

Log4j configuration
File TAFJTrace.properties for more information see
https://logging.apache.org/log4j/1.2/manual.html

log4j.debug=false
log4j.rootLogger=OFF
log4j.logger.T24=INFO, t24
log4j.logger.BASIC=ERROR, basic
log4j.logger.PRINTER=ERROR, printer
log4j.logger.DATABASE=ERROR, database
log4j.logger.JQL=ERROR, jql
log4j.logger.LOCKING=INFO, locking
log4j.logger.COMPILER=WARN, compiler
log4j.logger.DEPENDENCY=INFO, dependency
log4j.logger.RUNTIME=ERROR, runtime
log4j.logger.DBIMPORT=ERROR, dbimport
log4j.logger.SQLTRACE=ERROR, sqltrace
log4j.logger.ITYPE=ERROR, itype
log4j.logger.EXECUTE=ERROR, execute
log4j.logger.IOSERVER=INFO, ioserver
log4j.logger.MDB=ERROR, mdb
log4j.logger.EJB=ERROR, ejb
log4j.logger.MONITOR=ERROR, monitor
log4j.logger.API=INFO, api

Log4j2 configuration
File TAFJTrace.properties for more information see http://logging.apache.org/log4j/2.x/

Page 6
TAFJ-Lo g gi n g

loggers =
API,BASIC,CACHE,COHERENCE,COMPILER,COMPONENT_BUILDER,COMPONENT_USAGE,DATABASE
,DATABASE_RO,DBIMPORT,DBIMPORT_COMPARER,DEPENDENCY,DBTOOLS,EJB,EXECUTE,FILTER
,ITYPE,JQL,JQL_NOTSUPPORTED,LOCKING,MDB,PRINTER,RUNTIME,SANITYCHECK,SQLTRACE,
T24,TRUN,UPDATER,WRITEOUTOFTRANS,

logger.API.name = API
logger.API.level = ERROR
logger.API.additivity = false
logger.API.appenderRefs = api
logger.API.appenderRef.api.ref = api

logger.BASIC.name = BASIC
logger.BASIC.level = ERROR
logger.BASIC.additivity = false
logger.BASIC.appenderRefs = basic
logger.BASIC.appenderRef.basic.ref = basic

logger.CACHE.name = CACHE
logger.CACHE.level = ERROR
logger.CACHE.additivity = false
logger.CACHE.appenderRefs = cache
logger.CACHE.appenderRef.cache.ref = cache

Swit c h i n g log API


Since PB201607 TAFJ runtime gives the ability to use SLF4J as a façade:
http://www.slf4j.org/manual.htm

SLF4J allows choosing at deployment time the logging backend framework.

As stated above TAFJ is currently supporting Log4j and Log4j2, hence switching to SLF4J
would make sense in case of wanting to use Log4j as a backend API to continue using any
pre-PB201607 configuration.

Classpath setup
To be able to use SLF4J and Log4j 1.2, some classpath modification needs to be done.

1- Remove log4j-api.jar and log4j-core.jar from <TAFJ_HOME>\lib

2- Add under <TAFJ_HOME>\lib

o <TAFJ_HOME>\3rdParty\logging\slf4j\slf4j-api.jar

o <TAFJ_HOME>\3rdParty\logging\slf4j\slf4j.log4j12.jar

o <TAFJ_HOME>\3rdParty\logging\log4j12\log4j.jar

Page 7
TAFJ-Lo g gi n g

Runtime setup
To switch from native Log4j2 API to SLF4J, simply set the following system property.

Set up through JVM argument (appserver mode):

-Dtemenos.log.api=SLF4J

Or set up through environment variables (standalone mode tafj shell):

- Linux :

o export temenos_log_api =SLF4J

- Windows

o set temenos.log.api=SLF4J

To switch the backend API (behind SLF4J), to be Log4j 1.2 simply set the following system
property.

Set up through JVM argument (appserver mode):

-Dtemenos.log.backend=LOG4J

Or Set up through environment variables (standalone mode tafj shell):

- Linux :

o export temenos_log_backend =LOG4J

- Windows

o set temenos.log.backend=LOG4J

The default value of this property is LOG4J2.

It has to be set at TAFJ start up, and should be done through environment variables or
JVM arguments

Ba c k w a r d co m p a t i b i l i t y , ke e p usi n g log 4j 1.2 nativ e l y

Page 8
TAFJ-Lo g gi n g

Classpath setup
To be able to use Log4j 1.2, some classpath modification needs to be done.

3- Remove log4j-api.jar and log4j-core.jar from <TAFJ_HOME>\lib

4- Add under <TAFJ_HOME>\lib

o <TAFJ_HOME>\3rdParty\logging\log4j12\log4j.jar

Runtime setup
To switch from native Log4j2 API to Log4j 1.2, simply set the following system property.

Set up through JVM argument (appserver mode):

-Dtemenos.log.api=LOG4J

Or set up through environment variables (standalone mode tafj shell):

- Linux :

o export temenos_log_api =LOG4J

- Windows

o set temenos.log.api= LOG4J

Page 9
TAFJ-Lo g gi n g

Log fold e r s cu s t o m i z a t i o n

By default you will find above mentioned logs under following folders:

- <TAFJ_HOME>/log : for TAFJ logs

- <TAFJ_HOME>/log_T24 : for T24 logs

This default behavior could be overridden by using following properties:

- temenos.log.directory=<PATH_TO_YOUR_TAFJ_LOG_FOLDER>

- temenos.log.directory.t24=<PATH_TO_YOUR_T24_LOG_FOLDER>

It has to be set at TAFJ start up, and should be done through environment variables or
JVM arguments.

You cannot use the tafj.properties file for that purpose as loggers get initialized before tafj
properties get loaded.

Set up through JVM argument (appserver mode):

-Dtemenos.log.directory=/path/to/your/custom/log/folder

Set up through environment variables (standalone mode tafj shell):

- Linux :

o export temenos_log_directory=’path/to/your/custom/log/directory’

- Windows

o set temenos.log.directory=path\to\your\custom\log\directory

To revert this setting in tafj shell, simply set the property to an empty value.

- Linux :

o export temenos_log_directory=

- Windows

o set temenos.log.directory=

Page 10
TAFJ-Lo g gi n g

Log g i n g COMO
When using LOG4J2 as the logging API, it is possible to redirect COMOs to a standard
logger.

Rou ti n g an d file app e n d e r


By default a routing appender will be defined to have each agent logging to its own como file
(standard file appender). The routing being defined by a thread context property matching
the como name.

Simply set the following property as system property or JVM property at application start up.

- temenos.log.como=true

It will generate the “como” logger and appender configuration within TAFJTrace
configuration.

When using an existing deployment, make sure to delete current TAFJTrace configuration
file.

The como appender and logger will be defined in the newly generated configuration file.

i.e. when using properties configuration format.


appender.como.type = Routing
appender.como.name = como
appender.como.routes.type = Routes
appender.como.routes.pattern = $${ctx:COMO-NAME}
appender.como.routes.route1.type = Route
appender.como.routes.route1.file.type = File
appender.como.routes.route1.file.name = como-${ctx:COMO-NAME}
appender.como.routes.route1.file.fileName = ${sys:temenos.log.directory.como}/$
{ctx:COMO-NAME}
appender.como.routes.route1.file.layout.type = PatternLayout
appender.como.routes.route1.file.layout.pattern = %m%n

By default COMOs log files are going to be generated under

<TAFJ_HOME>/log_T24/como

This default behavior could be overridden by using following property:

- temenos.log.directory.como=<PATH_TO_YOUR_COMO_LOG_FOLDER>

Above properties have to be set at TAFJ start up, and should be done through
environment variables or JVM arguments.

Page 11
TAFJ-Lo g gi n g

So c k e t app e n d e r and rou ti n g and file app e n d e r


The above mentioned routing appender could be used in conjunction with a socket appender
to have COMOs files generated on a remote logging server.

In this scenario, TAFJ application will become a client of the logging server.

The appender to use on TAFJTrace configuration side will be the following, i.e. when using
properties configuration format.
#Socket client appender to be used to redirect como files to above remote routing
appender
#Setup appropriate hostname and port to match the remote logging server
appender.como.type = Socket
appender.como.name = como
appender.como.host = 10.56.7.99
appender.como.port = 1212
appender.como.layout.type = SerializedLayout
appender.como.connectTimeoutMillis = 2000
appender.como.reconnectionDelayMillis = 10000
appender.como.protocol = TCP

On the server side, the same routing appender than defined above will be used to receive
the log events from the socket and route them to the appropriate file.

1- Deploy on the logging server (LOG4J_HOME below) the following libraries which can
be found in the TAFJ release under 3rdParty\logging\log4j2:

o log4j-core.jar

o log4j-api.jar

o jcommander-1.48.jar

2- Copy on the server the TAFJTrace configuration defining the como routing appender

3- Start the TCP socket server with appropriate classpath and parameters, i.e.
set LOG4J_HOME=C:\lo4j-socket-server-conf
set CLASSPATH=%LOG4J_HOME%\*
set JAVA_OPTS=-Dtemenos.log.directory=%LOG4J_HOME%\log
-Dtemenos.log.directory.t24=%LOG4J_HOME%\t24-log -Dtemenos.log.directory.como=
%LOG4J_HOME%\como-log

java %JAVA_OPTS% -cp %CLASSPATH%


org.apache.logging.log4j.core.net.server.TcpSocketServer -c %LOG4J_HOME
%\TAFJTrace.xml -p 1212 --classes java.util.Collections$UnmodifiableMap --classes
java.util.HashMap

Page 12
TAFJ-Lo g gi n g

The TCP socket server will be started on the specified option -p port 1212 and defining the
logger configuration coming from option -c TAFJTrace.xml.

Communication could optionally be secured by using SSL. Please refer to log4j2


documentation.
https://logging.apache.org/log4j/2.0/manual/appenders.html#SocketAppender

In this case the client appender configuration has to be refined to define SSL parameters.

i.e.
appender.como.ssl.type = SSL
appender.como.ssl.protocol = SSL
appender.como.ssl.keystore.type=KeyStore
appender.como.ssl.keystore.location=log4j2-keystore.jks
appender.como.ssl.keystore.password=changeme
appender.como.ssl.truststore.type=TrustStore
appender.como.ssl.truststore.location=trustore.jks
appender.como.ssl.truststore.password=changeme

Page 13
TAFJ-Lo g gi n g

Log g e r co n t e x t
In a multi-tenant environment you may want to define a specific logger context to differentiate
the logs from the different tenants. It could also be useful for debugging purpose where a
user can define its own context.

By using property

- temenos.log.context=<YOUR_CONTEXT_NAME>

you will find your logs under :

- <TAFJ_HOME>/log/<YOUR_CONTEXT_NAME> : for TAFJ logs

- <TAFJ_HOME>/log_T24/<YOUR_CONTEXT_NAME> : for T24 logs

Same feature apply to overridden log directory as mentioned above.

When using a context you will also generate a dedicated file to configure your
appenders: TAFJTrace.<YOUR_CONTEXT_NAME>.properties file.

Like log directories properties it has to be set at TAFJ start up, and should be done through
environment variables or JVM arguments, refer to log folder customization sample above.

Set up through JVM argument (appserver mode):

-Dtemenos.log.context=customLogContext

Set up through environment variables (standalone mode tafj shell):

- Linux :

o export temenos_log_context=customLogContext

- Windows

o set temenos.log.context=customLogContext

To revert this setting in tafj shell, simply set the property to an empty value.

- Linux :

o export temenos_log_context=

- Windows

o set temenos.log.context=

Page 14
TAFJ-Lo g gi n g

Log redir e c t for Spl u n k

To redirect logs into Splunk instance, we need to modify the following property in
tafj.properties file

o temn.tafj.runtime.redirection.logger=

By default, if the above mentioned property is empty, logs will be generated in filexplorer.

If the splunk component is provided as the value for the above mentioned property, logs will
get forwarded to splunk.

ie) temn.tafj.runtime.redirection.logger=splunk

Specify the splunk URL and token using the below mentioned two properties,

o temn.tafj.runtime.redirection.splunk.url=

o temn.tafj.runtime.redirection.splunk.token=

By default, if the above mentioned properties are not provided, the default URL and token
used.

ie) URL = http://localhost:8088

Token = 0fbb0a31-4548-4468-a49b-64c361be3376

tCreateTraceWriter

Once the above properties are defined in tafj.properties file, user has to execute
tCreateTraceWriter file which is located inside %TAFJ_HOME%\bin directory in order to
generate the new TAFJTrace.properties file which is compatible for Splunk component.

The appenders will modified from Rolling file to HTTP.

ex) appender.T24.type = http

appender.T24.name = T24

appender.T24.url = ${defaultUrl}

Page 15
TAFJ-Lo g gi n g

appender.T24.token = ${defaultToken}

appender.T24.layout.type = PatternLayout

appender.T24.layout.pattern = ${defaultPattern}

Mult i- Ten a n t Log g i n g


Log4j2 (the default TAFJ logger) allows for multi-tenant logging. Logback and Log4j are
currently not supported. When multi-tenant mode is on (ie, property tafj.multitenant=true),
the TAFJTrace.properties is auto-generated and a routing appender is created for each
logger. For example:

appender.api.type = Routing

appender.api.name = api

appender.api.routes.type = Routes

appender.api.routes.pattern = $${ctx:tenantId}

appender.api.routes.route1.type = Route

appender.api.routes.route1.file.type = RollingFile

appender.api.routes.route1.file.name = api

appender.api.routes.route1.file.fileName = ${defaultLogDirectory}/${ctx:tenantId:-}/api.log

appender.api.routes.route1.file.filePattern = ${defaultLogDirectory}/${ctx:tenantId:-}/api.log.
%i.gz

appender.api.routes.route1.file.layout.type = PatternLayout

appender.api.routes.route1.file.layout.pattern = ${defaultPattern}

appender.api.routes.route1.file.policies.type = Policies

appender.api.routes.route1.file.policies.size.type = SizeBasedTriggeringPolicy

appender.api.routes.route1.file.policies.size.size=${defaultMaxFileSize}

appender.api.routes.route1.file.strategy.type = DefaultRolloverStrategy

appender.api.routes.route1.file.strategy.min = ${defaultMinBackupIndex}

appender.api.routes.route1.file.strategy.max = ${defaultMaxBackupIndex}

Page 16
TAFJ-Lo g gi n g

When a tenantId is active, it will be routed to the tenantId directory under defaultLogDirectory
(generally $TAFJ_HOME/log). For example, if TenantId1 is active, logs for TenantId1 will
appear under $TAFJ_HOME/log/TenantId1 directory. If no tenant is active, then logs appear
normally in the defaultLogDirectory. Likewise, COMO logs to the directory defined by
temenos.log.directory.como (generally $TAFJ_HOME/log_T24/como if no tenant is active). If
Tenant1 is active, it would log to $TAFJ_HOME/log_T24/como/Tenant1.

appender.como.type = Routing

appender.como.name = como

appender.como.routes.type = Routes

appender.como.routes.pattern = $${ctx:COMO-NAME}

appender.como.routes.route1.type = Route

appender.como.routes.route1.file.type = File

appender.como.routes.route1.file.name = como-${ctx:COMO-NAME}

appender.como.routes.route1.file.fileName = ${sys:temenos.log.directory.como}/$
{ctx:tenantId:-}/${ctx:COMO-NAME}

appender.como.routes.route1.file.layout.type = PatternLayout

appender.como.routes.route1.file.layout.pattern = %m%n

Det a i l s of Log Type s in TAFJTrac e

The log types used by the TAFJ component are listed in the following table,

Log Types

Page 17
TAFJ-Lo g gi n g

NO LOG TYPES DESCRIPTION

Page 18
TAFJ-Lo g gi n g

All information related to TAFJClient entry point is logged in


1 API here.

i.e. calls coming from tComponentFramework(IF/IRIS) etc.

2 BASIC Anything that is added as TRACE in JBC code.

TAFJ Cache related entries if in use will be logged in this


3 CACHE
specific logger.

4 COHERENCE Invalid - not in use.

5 COMO TSA agents information will get logged.

6 COMPILER Logs related to compilation command execution.

Starting R17 and above compilation of JBC should make use


7 COMPONENT_BUILDER of tComponentBuilder and all information specific to
compilation will be logged in this specific logger.

While writing components in JBC, the logger helps the


8 COMPONENT_USAGE evolution of componentization. The call is invoked from the
functions inside the component.

All configuration properties can be either stored in properties


file or at database level for application server deployments.
9 CONFIGURATION
The following logger logs all necessary information for
properties used inside database.

Whenever accessing/modifying the records available in


10 DATABASE
database will get logged.

Whenever accessing the records available in Read-Only


11 DATABASE_RO
database will get logged.

12 DBIMPORT Logs related to DBImport command execution.

13 DBIMPORT_COMPARER Logs related to DBComparer command execution.

Logs all necessary information about caller dependency while


building dependency information when invoked from
14 DEPENDENCY
dependency view inside eclipse under tafj plugin. Please refer
to dependency section for more information about this tool.

15 DBTOOLS Logs related to DBTools command execution.

16 EJB Contains information about online message processing specific

Page 19
TAFJ-Lo g gi n g

to business logic, i.e. invoking OBM etc.

17 EXECUTE Anything that is added as EXECUTE in JBC code.

18 FILTER Compiler related filters in JBC will be tracked in the logger.

In conjuction with TAFJ Cache, IGINITE related information is


19 IGNITE
logged in this specific logger.

20 ITYPE ITYPE descriptors related logs.

21 JQL Translation of supported JQL commands will get logged.

22 JQL_NOTSUPPORTED Translation of unsupported JQL commands will get logged.

23 LOCKING Logs related to Locking mechanism for all locking modes.

Logs information related to tLockManager (PROC) mode


24 LOCKING_SERVER
server process.

Logs information about what type of logger is used at startup,


25 LOGGING
i.e. log4jV1, log4jV2, SL4J, LOGBACK etc.

Contains information about online and batch threads used


26 MDB inside application server with all related information about the
thread.

27 PERFORMANCE Invalid entry.

28 PRINTER Whenever accessing the printers will get logged.

29 RUNTIME Runtime session related information will get logged.

Sanity check tool will produce the logs containing the


30 SANITYCHECK
application configuration.

31 SELECTLIST Logs information about internal select used inside T24.

32 SERVLET Logs related to Execute servlet commands from the browser.

33 SQLTRACE Translation of SQL commands will get logged.

34 T24 Logs will get written while working with T24 product.

35 TRUN Logs related to tRun command execution.

Logs information about T24 updates installation (child installer


36 UPDATER
invoked by parent installer).

37 WRITEOUTOFTRANS Logs all database writes information which are not part of

Page 20
TAFJ-Lo g gi n g

transaction boundary in T24. Ex: all SEAT related writes.

Page 21

You might also like