Skip to main content

How to enable or disable log4j for a custom component

This article explains how to enable log4j in a custom component in order to trace and record log messages regarding the execution of this component. It also explains how to disable it for the whole component or for a particular parameter.

Note that you can develop custom components using the Talend Component Kit framework. For more information, see Developing a component using Talend Component Kit.


The log4j feature is only available in Talend subscription product starting from version 5.6.


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?
Enabling the log4j for a custom component

In order to enable log4j for a custom component, proceed as follows:

  1. Open the *_java.xml file corresponding to the custom component for which you want to enable log4j.
  2. In the HEADER element of this file, add the following line:

    The HEADER element of your *_java.xml file should look like this:

        AUTHOR="Component Author"

    Note that it is advised to append the log4j attribute to the last attribute of the HEADER element.

Deactivate log4j for a parameter

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.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!