Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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
Labels (4)
4 Replies
Anonymous
Not applicable
Author

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
_AnonymousUser
Creator III
Creator III

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

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?
Anonymous
Not applicable
Author