Ask Your Question
0

Add more details in the sdc logs

asked 2020-05-12 17:50:49 -0500

wilson shamim gravatar image

updated 2020-05-12 17:54:27 -0500

hi Team,

How can we add more details in the sdc log. Say I have generated UUID and that I want to add in all the lines for a particular job. right now I am able to generate a UUID and able to write at the start and the end of the line for the job using groovy script using init and destroy. so my requirement is I have an orchestration pipeline which invokes 3 jobs. so to link all these jobs I have created a UUID and pass that UUID as a parameter. i want to print this uuid for all those jobs in the link. so that I can separate out all the job runs in the log

edit retag flag offensive close merge delete

Comments

Hi! Seems like you already have a solution in place so I am not clear what the issue is. If you have access to UUID in Groovy Evaluator, you can use log.info("**** UUID: ", uuid_value_goes_here) to have it printed in sdc.log.

iamontheinet gravatar imageiamontheinet ( 2020-05-14 14:20:36 -0500 )edit

Thanks! my question is there a way to add more detail in the log4j for every lines of the sdc.log. may be like some run ids, or unique IQ for a particular job? %d{ISO8601} [user:%X{s-user}] [pipeline:%X{s-entity}] [runner:%X{s-runner}] [thread:%t] [runid:%r]. [uniqueID:%uu]......

wilson shamim gravatar imagewilson shamim ( 2020-05-14 15:12:23 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2020-05-14 16:10:23 -0500

iamontheinet gravatar image

Got it. AFAIK, adding user-defined info to every single line that gets output to sdc.log isn't something that's possible without code change.

edit flag offensive delete link more
0

answered 2020-05-13 23:34:15 -0500

uzumaki gravatar image

You can look into using a shell executor for custom log files.

edit flag offensive delete link more

Comments

can you provide some more details. how can we add log for each activities using shell

wilson shamim gravatar imagewilson shamim ( 2020-05-14 08:01:25 -0500 )edit

Like @iamontheinet mentioned, it won't be added to log. You can maintain custom log files in sdc file system instead. I've seen this being done for audit purposes, but it might work for you too.

uzumaki gravatar imageuzumaki ( 2020-05-19 23:27:01 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2020-05-12 17:50:49 -0500

Seen: 38 times

Last updated: May 13