enable jog4j

Highlighted
Seven Stars

enable jog4j

Hello,

 

I want to create a custom component. Inside the component I want to use a logger. I see from other components that they use 

<%if(isLog4jEnabled) {%>

 log.info(....)

 

How can I enabled log4j inside the studio and inside karaf? 

 

Greets

 

Benjamin

 

Moderator

Re: enable jog4j

Hello, 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: LOG4J_ENABLED="true" The HEADER element of your *_java.xml file should look like this:
Note that it is advised to append the log4j attribute to the last attribute of the HEADER element. Let us know if it is OK with us. Best regards Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Seven Stars

Re: enable jog4j

Hello,

 

no not working. I have set LOG4J_ENABLED="true" in the header. In the javajet file I add log.info("..."). But if I make a job with the component, the compiler not found log.

Moderator

Re: enable jog4j

Hello, Can you get "log4j" check box on your custom component? What's your build version you are using? Are you using talend subscription solution? Note: The log4j feature is only available in Talend subscription product starting from version 5.6. Best regards Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Seven Stars

Re: enable jog4j

Hello,

 

no I dont see log4j checkbox in my component. I am working with Talend Open Studio for ESB 6.2.1. I dont know what is a talend subscription solution.

 

 

 

Greets

 

 

Benjamin

 

Moderator

Re: enable jog4j

Hi,

Please take a look at talend ESB product matrix page:http://www.talend.com/products/application-integration

The log4j feature is only available in Talend subscription product not open source.

Best regards

Sabrina

 

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Seven Stars

Re: enable jog4j

Ok have I any possibility to log in open source? Or if I use subscription product for development the component and other people use it in open source, have they the logging function?
Moderator

Re: enable jog4j

Hi,

 


@benjamin wrote:
Ok have I any possibility to log in open source? Or if I use subscription product for development the component and other people use it in open source, have they the logging function?

Unfortunately, other people cannot use log4j feature in open source.

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

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

An API-First Approach to Modernizing Applications

Learn how to use an API-First Approach to Modernize your Applications

Watch Now

Talend API Designer – Technical Overview

Take a look at this technical overview video of Talend API Designer

Watch Now

Getting Started with APIs

Find out how to get started with APIs

Read