Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
tale103108
Contributor III
Contributor III

Using Talend Open Studio 6.3 does not allow the use of log() calls for log4j-like logging

I have read that the tJava component allows you to use the existing log instance of the Job, for example:

log.debug("DEBUG: Hello World");
log.info("INFO: Hello World");
log.warn("WARN: Hello World");
log.error("ERROR: Hello World");

 

When using Talend Open Studio 6.3.0, I get the compilation error:

At least job "Test_Log4j" has a compile errors, please fix and export again.
Error Line: 1446
Detail Message: log cannot be resolved

 

when using tJava component and

log.info("INFO: job started");

 

I know log4j is not available in Talend Open Studio (free version).  But can I still use log()?

If not, what can I do to use or mimic log4j logging in Talend Open Studio?

Labels (2)
3 Replies
Anonymous
Not applicable

Hello,

Have you tried to look at custom component which can be used to enable log4j?

https://exchange.talend.com/?_ga=2.119802632.1425030005.1564367914-460644329.1557110663#marketplacep...

Let us know if it helps.

Best regards

Sabrina

tale103108
Contributor III
Contributor III
Author

Are these components free and available with Talend Open Studio 6.3? 

Is there any log4j.properties or log4j.xml setup needed?

Is there a good example of how to use this beyond the example given (the example shows just when the job starts and stops -- I need to log errors as well)?

 

I have been looking at tLog4j, tLog4Catcher, and tInitLog4j components.  Are these components better and compatible with TOS 6.3 (it does not seem so based on documentation which says last tested on 6.1).

 

Examples of these components would be nice!

Anonymous
Not applicable

Hello,

The third party custom components on Talend Exchange are written by talend community users and shared on talend exchange portal, since we don't have the source code of these components.  It is the ownership of the person who built it.

Feel free to contact the author directly.

Best regards

Sabrina