- 1 minutes to read

Log4Net Appender, FAQ, Troubleshooting, Common Questions Log4Net Appender, FAQ, troubleshooting, common questions Can I log SOAP/REST request/response payloads without changing application code?

Can I log SOAP/REST request/response payloads without changing application code?

Can I log SOAP/REST request/response payloads without changing application code?

Yes—using Log4Net message parameter substitution or custom Context properties. Option 1 (message parameter): In WCF service or Web API, log full payload in log message: logger.Error($"SOAP request failed: {soapRequestXml}", exception);—Nodinite captures full log message including payload (up to 1 MB default, configurable). Option 2 (Context property): Set payload in ThreadContext: ThreadContext.Properties["RequestPayload"] = soapRequestXml; logger.Error("SOAP request failed", exception);—Nodinite preserves as separate Context property (better for large payloads, enables Search Field Expressions to extract business data). Important: For PCI-DSS/HIPAA compliance, mask sensitive data before logging (credit cards, SSNs): ThreadContext.Properties["RequestPayload"] = MaskCreditCard(soapRequestXml);.


See all FAQs: [Troubleshooting Overview][]