One Star

share logs between parent and subjob

hello everybody,
my jobs shares some treatments so I've made some subjobs.
I would like to make a log file for each parent job, but only one.
Is there a way to do that? according with some answers, it seems that there is no way to throw errors to parents jobs.
I wouldn't like to make somes context variables. is it possible to send all errors from subjobs to console and redirect them to a log file?
best regards,
Matthieu
6 REPLIES
One Star

Re: share logs between parent and subjob

Hi Matthieu,

See on the job setting view the stat&log.
you can chose the files for the job.

Jérémie
One Star

Re: share logs between parent and subjob

Hello Jeremie,
yes i have seen this settings but I would like to share the same log file from parent and many childrens jobs.
Some parents jobs use the same subjobs.
For the moment, I have a context variable which defined the context.log_folder file.
I would like that was the parent job which deifned the log filename. So I have think to pass a parameter for the subjob and this parameter was set by the parent job, but don"t think it's the better way to do that.
And I would like to know if there is a cleaner way Smiley Happy
best regards
One Star

Re: share logs between parent and subjob

Yes, it is.

best regards
One Star

Re: share logs between parent and subjob

I've taken to starting my jobs with a tJava that have this code, so the job name is printed to the output
System.out.println("");
System.out.println("***" + jobName + "***");
System.out.println("");
One Star

Re: share logs between parent and subjob

and you redirect output from STDIN?
One Star

Re: share logs between parent and subjob

Wait, I read it wrong, I didn't realize you want separate log files for each parent job. Hmmm....
Yea, I think the best way is to set up all of your jobs is to set up all the stats & logs settings like in the pic and then passing the appropriate folder and file name from the parent to the child jobs

if 5108 gets implemented, then you could use a tJava and a System.out.println command to print the child job console output to your log file