Log4j2 Configuration for TOS DI

One Star

Log4j2 Configuration for TOS DI

Hi,
We are using TOS DI v5.5.1. I have the following two questions regarding Log4j related configurations:
(1) Log4j configuration: 'https://help.talend.com/pages/viewpage.action?pageId=207421454' states ${TalendJob.log} as a dynamic file name variable. But, using this variable is creating a file as 'jobName.log' in the specified folder, say, D:/ if D:/${TalendJob.log} is specified in the log4j.xml file. How to specify a dynamic value for the folder as well as the log file name in the xml file? For example, if there is a context parameter by name 'log_file' (say it contains a user specified path+file name like C:/mytalend/myproject/mylog.log). Note: I am able to use JVM argument and set the variable name. I would like to know if this is possible through a context variable.
(2) Log4j2 configuration: Is it possible to configure TOS DI v5.5.1 for Log4j2 logging in JSON format?
Please help.
Thanks,
Sudha
Community Manager

Re: Log4j2 Configuration for TOS DI

Hi 
I have consulted to our developer and was told that it uses log4j to capture the log message and it doesn't support context variable.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Log4j2 Configuration for TOS DI

Shong,
I am using the ${TalendJob.log} and it works fine. It creates a log file with the Talend's job name.
Shuba
Six Stars

Re: Log4j2 Configuration for TOS DI

Yes, I can also confirm that it supports dynamic variables in 5.4.1 EE version to be used in conjunction with log4j.
Log4j2 is another story, I think this is not supported in the moment and will require recompilation of Talend OS edition, in case of EE, is there any plan to support version 2 of log4j?
Six Stars

Re: Log4j2 Configuration for TOS DI

Calling Talend Open Studio Users

The first 100 community members completing the Open Studio survey win a $10 gift voucher.

Start the survey

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Download