Closed
Write service request and response to a separate file
Hi All,
We have a requirement to write service request and responses to a separate file. Can somebody please help with the steps along with script to change in prlogging.xml?
Thanks,
Venkat
***Edited by Moderator Marissa to update categories***
Hi Venkat,
Thanks for posting on PSC.
I am curious to know if you have the requirement to configure logging service request/response activity to an external file? As prlogging.xml is used mostly for configuring or altering the logging settings in Pega.
The code snippet may help you in writing the binary content to a file(external path in your case) in an activity's Java Step.
f= new java.io.File(FullPath+pdfName);
fileOuputStream = new java.io.FileOutputStream(f);
fileOuputStream.write(byteArray);
fileOuputStream.close();
After the file is ready, invoke an OOTB activity "DownloadFile" to download the file at desired location.
Hope it helps you in achieving the requirement. Kindly notify if it does.
Regards,
Asif