How to pass context variables to log4j.xml in talend?

Six Stars

How to pass context variables to log4j.xml in talend?

Hi Team,

please help me in how to call context variables from log4j.xml fie .

I have found log4j supports variable substitution as ${variableName}.

how can i call context variable to log4j.xml file in above syntax

 

Thanks,

Abhi529 

Community Manager

Re: How to pass context variables to log4j.xml in talend?

I don't believe you can use context variables here. This is based on a response from Talend R&D from around 2015. However, this may have changed. @shong is this still the case?

Community Manager

Re: How to pass context variables to log4j.xml in talend?

Hi
I don't think it is possible to use context variable directly in log4j.xml file, maybe you need to reinitialize log4j on a tJava and use context variable.

Regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
Six Stars

Re: How to pass context variables to log4j.xml in talend?

Hi @shong,

 

Thank you for your answer.

could you please explain me "how to reinitialize log4j on a tJava and use context variable.

 

Thanks,

Abhi529

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

Talend API Services Publish to Talend Cloud

Learn how to publish your API Services to Talend Cloud

Watch Now

Cloud Data Warehouse Trends for 2019

Find out aboutCloud Data Warehouse Trends for 2019

Read