One Star

Get Log file Name

Hi,
I can see job execution log file details in TAC and I want to display/Print the log file name using tjava.
How to get the log file name ?
Regards,
R.Bharath
9 REPLIES
Moderator

Re: Get Log file Name

Hi,
You can use system variables to obtain the log name and the path of logs files at the execution server in tJava.
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.
One Star

Re: Get Log file Name

Hi Sabrina,
which the system variable name and how ? Can you please share sample ?
Regards,
R.Bharath
Community Manager

Re: Get Log file Name

Hi  
Th log file is generated after the job execution, it is located in the folder where you specified in the Task logs Folder parameter of Job conductor in configuration page. The log file name looks like execution_20151118134334_iJxwO.log
I don't understand why  you need to print the log file name in the job? Can you please explain your requirement?
----------------------------------------------------------
Talend | Data Agility for Modern Business
Three Stars

Re: Get Log file Name

Hi Shong,

Sightly different scenario!Can we get the count of jobs created,status of the jobs(executed/failed/successful)

from those log file on a daily basis.If an user tries to find with date can he have those info from those file.Is it a single file for each day for all the tasks have been performed by TAC on that day?Cculd you please help on that?

Employee

Re: Get Log file Name

Hi,

 

     The best way to extract the historical processing information in Talend will be through AMC.

 

https://help.talend.com/reader/RK~CAb9nJ1erxR8SrBbKoQ/kIdpYF8VDUo~Sa2Y1rTE_g

 

Warm Regards,

 

Nikhil Thampi

Three Stars

Re: Get Log file Name

Thanks @nkhilthampi for your quick reply. Could you please suggest if AMC is not available..in that case can we identify the log files on daily basis and retrieve those info for the tasks from those files..
Employee

Re: Get Log file Name

Hi,

 

    In that case, you will have to parse the log files based on your needs and based on the input data available in log files, you can achieve the job tracking. But you will have to build those custom codes to read the log files and parse according to your need.

 

Warm Regards,

 

Nikhil Thampi

Three Stars

Re: Get Log file Name

Sure thing! code is available to parse those files..only need to make sure if an user want to see the count of tasks created,the number of successful/failed job for a particular day..will that be possible to find out from those file?
Employee

Re: Get Log file Name

Hi,

 

     Job failure can happen due to multiple reasons. For example, the jobs may not read into the log folder due to multiple reasons (a very common example is 100% space utilization). In that case, the log file will not have complete data. So reading the log files alone will not help you to achieve this task.

 

     Also it depends on the amount of logging you are forcing the Talend to do based on your custom coding. It will be a good idea to measure the time and effort required to do this verification and compare the time and cost part with subscription amount of Talend with AMC feature. 

 

    I would say it is quite possible to do it by custom coding but error probability will be higher and you will have to ensure that you have mechanisms to catch all different scenarios.

 

Warm Regards,

 

Nikhil Thampi