Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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

 

Labels (2)
7 Replies
Anonymous
Not applicable
Author

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: <HEADER plateform="ALL" serial="" version="2.0" status="ALPHA" compatibility="ALL" author="Component Author" release_date="20070525A" startable="false" log4j_enabled="true"> <SIGNATURE></SIGNATURE> </HEADER> 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
Anonymous
Not applicable
Author

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.

Anonymous
Not applicable
Author

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
Anonymous
Not applicable
Author

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

 

Anonymous
Not applicable
Author

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

 

Anonymous
Not applicable
Author

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?
Anonymous
Not applicable
Author

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