Platform Framework
R24 AMR | Min(s) read

Multitenant Logs

This section shows the TAFJ logger which generates the multitenant logs and briefly describes the multitenant logging process.

The default TAFJ logger (Log4j2) allows multitenant logging. When multitenant mode is enabled, 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}
Logback and Log4j are not supported.

When a tenant ID is active, it is routed to the tenant ID directory (generally under $TAFJ_HOME/log). For example, if Tenant1 is active, then logs for Tenant1 will appear under $TAFJ_HOME/log/TenantId1. If no tenant is active, then logs appear normally in the default log directory.

Likewise, COMO logs are routed to the directory defined by temenos.log.directory.como (generally under $TAFJ_HOME/log_T24/como, if no tenant is active). If Tenant1 is active, then COMO logs 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

In this topic

Copyright © 2020- Temenos Headquarters SA

Published on :
Monday, May 27, 2024 5:03:52 PM IST