The availability of a limited use of Groovy (the limitations will become clear shortly) is necessary as when it comes to logging and recording of API message content several considerations need to be accounted for, particularly:
- The payloads for an API maybe large but only a small part of the content needs to be logged, remembering writing contents to disk is a lot slower than the cost of executing logic to reduce what needs to be written to logs.
- API payloads may contain sensitive data (for example, personal data, passwords, and so on) which should not be included into log files as the log files are written in plain text and not encrypted in their standard configuration. For example, if the API is handling credit card transactions, logging the card information would conflict with the Payment Card Industry (PCI) rules.
The full rules for PCI compliance...