Question
Radial Inc
US
Last activity: 9 Feb 2018 16:02 EST
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***
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
EPAM Systems, Inc.
ES
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
Radial Inc
US
Hi Asif,
Thank you for your reply. Our application is processing half a million transactions per day, it processes about 2 million transactions on a peak day. We need a good solution to continiously log all the request and response messages to a separate text file. I am not sure if the above suggested java solution works for us.
Thanks,
Venkat
Pegasystems Inc.
IN
Hi Venkat,
Which service your using ?
Pega Version ?
Based on that we will let you know which logger you need to use .
Thanks,
Arun
Radial Inc
US
Hi Arun,
I am using REST service. PRPC version is 7.2.2.
Thanks,
Venkat
Pegasystems Inc.
US
@VenkatY9619 actually in the Service Package i can see the interaction history details which traces the requests and responses, will that help you?
Radial Inc
US
We are using PRPC 7.2.2, no interaction history available. This new feature is part of 7.3.1.
Thanks,
Venkat
conED
CA
Hi Venkat,
Do you want to write each request & response to one external file ? or are you going to use the same file for all the requests and responses in a day ?