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

 

4 REPLIES
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