Saving pipeline contents to a custom application log

Hi

I’m using log4j to log messages to an application log. Right now I’m able to log simple text to the log. Now I want to log the entire pipeline contents to the same log. I’m unable to find how to achieve this. I know that savepipelinetofile can be used but I believe this will overwrite the file. Moreover I can’t use different log files for each savepipelinetofile calls.

If any of you have achieved this, please let me know.

Thanks.

try to write a service which loops over the pipeline elements and generates the same output as tracePipeline