How to configure the file path dynamically in log4j.xml file in talend?

Six Stars

How to configure the file path dynamically in log4j.xml file in talend?

I have my log4j.xml as follows...

 Capture.JPG

In the above figure, in highlighted part , i am giving the path statically. But, i want to give context path there...How can i read the context path there ...please give me the solution 

 

Thanks in advance,

Abhi529

 

Six Stars

Re: How to configure the file path dynamically in log4j.xml file in talend?

You can try using tInitLog4J custom component. With this component you can specify your custom log4j configuration file.

The component source code is available under: https://github.com/bcourtine/Composants-Talend-Open-Studio/tree/master/Logging

And the component is available under: tInitLog4J

 

image.png

 

 

- JG
Six Stars

Re: How to configure the file path dynamically in log4j.xml file in talend?

Hi h311,
Thanks for giving the answer.. could you please give me the screen shot of job (to know how to use tInitLog4J )

Thanks,
Abhi529
Six Stars

Re: How to configure the file path dynamically in log4j.xml file in talend?

Please find the screenshot below,

image.png

- JG
Six Stars

Re: How to configure the file path dynamically in log4j.xml file in talend?

Hi h311,+
I did not find any difference by using tInitLog4J and without using tInitLog4J , and I think this is not suitable solution for my question..

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

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