You are not logged in.

#1 2017-03-17 13:40:25

plumberg
Member
113 posts

plumberg said:

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.

Offline

#2 2017-03-17 16:30:07

vharcq
Member
8 posts

vharcq said:

Re: Capture System.out.println

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

Offline

#3 2017-03-17 17:01:33

plumberg
Member
113 posts

plumberg said:

Re: Capture System.out.println

vharcq wrote:

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

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

Offline

#4 2017-03-18 00:45:12

vharcq
Member
8 posts

vharcq said:

Re: Capture System.out.println

Could you try Log4j logger ?

Offline

#5 2017-03-18 01:23:41

archenroot
Member
235 posts

archenroot said:

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


Emperor wants to control outer space Yoda wants to explore inner space that's the fundamental difference between good and bad sides of the Force

Offline

#6 2017-03-20 16:16:29

plumberg
Member
113 posts

plumberg said:

Re: Capture System.out.println

archenroot wrote:

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? 

Offline

Board footer

Talend Contributor Agreement - Talend Website Privacy Policy