Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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
Labels (2)
6 Replies
Anonymous
Not applicable
Author

Hi Matthieu,

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

Jérémie
Anonymous
Not applicable
Author

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
Anonymous
Not applicable
Author

Yes, it is.

best regards
Anonymous
Not applicable
Author

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("");
Anonymous
Not applicable
Author

and you redirect output from STDIN?
Anonymous
Not applicable
Author

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