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

Highlighted
Six Stars

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?

Tags (2)
Moderator

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

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

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

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

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!

Moderator

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

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

--
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

Best Practices for Using Context Variables with Talend – Part 3

Read about some useful Context Variable ideas

Blog

Talend Studio Improvements for API Services

Take a look at the Talend Studio improvements for API Services

Watch Now

Data Integration Success Stories

Take a look at some Data Integration success stories

Read