Seven Stars

Capture System.out.println

I am currently running karaf by doing ./trun
This prints out all messages logged on to the console. How to capture these messages when running in background via ./start?
Please advise. Thank you.
5 REPLIES
Six Stars

Re: Capture System.out.println

Then it goes to <karaf>/log/tesb.log
Seven Stars

Re: Capture System.out.println

Then it goes to <karaf>/log/tesb.log

I checked that, I could not find those system.out.printlns
Six Stars

Re: Capture System.out.println

Could you try Log4j logger ?
Six Stars

Re: Capture System.out.println

In Studio under File -> edit project properties there is configuration of log4j (version 1) - there are also some components for log4j logging in Talend Exchange.
This is for any Talend product the same. In case of ESB as we have Karaf instance available there is also karaf Pax logging system, which integrates the Talend log4j. Look at container/etc/org.ops4j.pax.logging.cfg where you can also configure loggers which can be then called from any bundle deployed in following way:
import org.slf4j.Logger; 
import org.slf4j.LoggerFactory; 
... 
private final static Logger LOG = LoggerFactory.getLogger(MyService.class); 
... 
LOGGER.info("Service myservice audittrail: entering the pipeline"); 
....if you like the pure Java
Seven Stars

Re: Capture System.out.println

In Studio under File -> edit project properties there is configuration of log4j (version 1) - there are also some components for log4j logging in Talend Exchange.
This is for any Talend product the same. In case of ESB as we have Karaf instance available there is also karaf Pax logging system, which integrates the Talend log4j. Look at container/etc/org.ops4j.pax.logging.cfg where you can also configure loggers which can be then called from any bundle deployed in following way:
import org.slf4j.Logger; 
import org.slf4j.LoggerFactory; 
... 
private final static Logger LOG = LoggerFactory.getLogger(MyService.class); 
... 
LOGGER.info("Service myservice audittrail: entering the pipeline"); 
....if you like the pure Java

So, when I have my service running using ./trun, it outputs all logs to the console. What is different in doing ./start and not being able to save/ view the logs?