Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
In my TOS ESB tRestRequest/ tRestResponse job, I have put in a few debug statements using System.out.println(). These show up when I am running the Runtime container using ./trun
However, when I start the Runtime container using ./start, these logs do not appear and neither are they logged in the <RunTimeContainer>/log/tesb.log file
How can I capture that information? Please help. This has been driving me crazy for the past few days.
Thank you.
Hi,
Could you try with log.info() ?
Eric
Umm, Do I need to import any libraries? log.info() gives me.. Any example will be helpful. Or any other way in which I can capture the console details in tesb.log
log cannot be resolved
In a tJavaRow, I just enter:
log.info("This is a test");
In your job code, don't you see these java lines:
if (!"".equals(log4jLevel)) {
if ("trace".equalsIgnoreCase(log4jLevel)) {
log.setLevel(org.apache.log4j.Level.TRACE);
} else if ("debug".equalsIgnoreCase(log4jLevel)) {
log.setLevel(org.apache.log4j.Level.DEBUG);
...
Eric
I don't know... If I create a job without any component, I already have this code piece...
What version of Talend are you using @mbocquet? If you go to your "Code" tab which shows you the autogenerated Java code for your job, you should see some code that looks like this....
//GetFileDetails.class is the name of the job
private static org.apache.log4j.Logger log = org.apache.log4j.Logger .getLogger(GetFileDetails.class);
My suspicion is that you are not using v6.
You can potentially get around this (I've not tried this since I do not have a version without this on my current machine) by adding the relevant Jar using a tLibraryLoad and using the following code....
org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger("MyLog");
I'd be interested to see if this works. As I said, I would have tried this myself but the version I am using has this.
Another possibility could be that this is functionality left out of the open source edition.