cancel
Showing results for 
Search instead for 
Did you mean: 

Logging mechanism in order to get parent pipeline name in logging pipeline

SL12345
New Contributor III
Hi Snaplogic experts
 
i have general question, concerning logging. Lets say pipeline with logging function can be called by 5 parent pipelines: 
 
parent_pipeline_A
parent_pipeline_B
parent_pipeline_C
..
..
 
 
then i have 
  child_pipeline_A
  child_pipeline_B
  
 
 and 
pipelineWithLogging() 
 
workflow:  parent calls  child and child has another child - pipelineWithLogging()
 
parent_pipeline_A -> child_pipeline_A -> pipelineWithLogging()
parent_pipeline_B -> child_pipeline_B -> pipelineWithLogging()
parent_pipeline_C -> pipelineWithLogging()
 
Question:
What is the best approach to get pipeline names from parent pipelines to pipelineWithLogging() in order to log them? 
 
Is good approach to get rootRuuid and parentRuuid and pair them later on and be able to read:
log message:
FileA from parent_pipeline_A processed successfully ?    
(it is just dummy text :))
 
Thank you
1 REPLY 1

tlikarish
Employee
Employee

I'd probably take the approach where the "root" pipeline (parent_pipeline_A) would pass it's label into the child, then the child would pass that in to the pipelineWithLogging. The Pipeline Execute snap can set a child pipeline's parameters and that would be a way to achieve this.

There are other options, but this seems like a pretty straightforward approach.

 

tlikarish_1-1710248681723.png