Hi,
I have a couple of questions wrt to the Message Logging Policy.
I created a policy that will log on Errors, but I am struggling to get any decent info out of the message logs. Below is the policy which I created so far.
So my issues I am getting is the following:
- -If it is a 200 OK it gets logged even if I set the LogLevel to ERROR
- -Not all failures get logged. (I want to log all failures (Errors))
- -The only content that gets logged in my “MESSAGE” below is “message.status.code”
- -How do I log the message associated to the Error. I have tried multiple variations from the following page: https://docs.apigee.com/api-platform/reference/variables-reference but most of them logs a blank value
- -Is it possible to log information in multiple lines
- -Is there recommended objects to log that will kind of substitute running a trace? So that we can troubleshoot after the fact.
- -Will one transaction be logged per file or is it going to log multiple per files
Message Logging Policy
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>Error Code: {message.status.code} || Error Content: {error.transport.message} || Error Message: {error.reason.phrase} || {request.header.x-api-key.values} || {request.header.content-type.values}"
"
test2.log
TIME_SIZE
10
10
ERROR