Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I've noticed that in the tesb.log files Talend logs the pool and thread id numbers
2019-05-30T11:03:45,356 | INFO | pool-36-thread-85 |
Is there a way to get this programmatically to add to a custom log file? I've tried Thread.currentThread() but this seems to be something different as i get i.e. Thread[main,5,main]
Thanks
I'm not sure how useful this will be to you, but you might want to look here: https://www.journaldev.com/1069/threadpoolexecutor-java-thread-pool-example-executorservice
What sort of logging are you trying to achieve? I think there might be more useful mechanisms for you to make use of.
@rhall We are reworking a suite of Talend jobs which a consultancy firm created for our company. The way they had chosen to create logs in these jobs was to use the tLogRow and then give the testing team access to the tesb.log on the ESB server which is extrememly bad practice and not fit to go into production. I've updated them so the jobs now log to an external file away from the ESB server, however, the testers have stated that they use the thread number in the tesb.log to trace a request through the system. I could obviosuly create some kind of ID which persistes end to end but thought if it was easy to replicate the tesb.log functionality then I'd do that.