How to enable or disable log4j for a custom component
The log4j feature is only available in Talend subscription product starting from version 5.6.Prerequisites
Before following this procedure, it is strongly advised to read the following articles:
- How to create a custom component
- How to activate log4j in Talend Studio?
In order to enable log4j for a custom component, proceed as follows:
- Open the *_java.xml file corresponding to the custom component for which you want to enable log4j.
- In the HEADER element of this file, add the following line:
The HEADER element of your *_java.xml file should look like this:
<HEADER PLATEFORM="ALL" SERIAL="" VERSION="2.0" STATUS="ALPHA" COMPATIBILITY="ALL" AUTHOR="Component Author" RELEASE_DATE="20070525A" STARTABLE="false" LOG4J_ENABLED="true" > <SIGNATURE/> </HEADER>
Note that it is advised to append the log4j attribute to the last attribute of the HEADER element.
To deactivate log4j for a specific parameter, add the following attribute to the parameter you want to deactivate log4j for:
Please note that log4j is activated by default for a parameter.