Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

logLevel in MessageLogging is not working as expected due to some reason.

Hello,

I may need a help to identify what wrong I am doing here....

Given logLevel is ERROR, but it is logging all the success and failure. Not sure what is wrong here in the Message Logging code. Also, tried the other valid values (ALERT, WARN) but I don't see any difference - all the success and failures are logging. (I am not using FormatMessage here).

What I am trying to do is, log only the failed transactions (such as the response code with 4XX, 5XX).

Apigee Version 4.18.05.00

Any input on this is appreciated..

Post Client Flow code:

<PostClientFlow> <Request/> <Response> <Step> <Name>Message-Logging</Name> </Step> </Response> </PostClientFlow>

Message Logging Code:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<MessageLogging async="false" continueOnError="false" enabled="true" name="Message-Logging">

<logLevel>ERROR</logLevel>

<DisplayName>Message Logging</DisplayName>

<File>

<FileName>message.log</FileName>

<Message>

{ "date/time":"{system.time.year}-{system.time.month}-{system.time.day} {system.time.hour}:{system.time.minute}:{system.time.second}", "system.timestamp":"{system.timestamp}", "apiproxy.name":"{apiproxy.name}", "log.uuid":"{messageid}", "message.status.code":"{message.status.code}", "error.state":"{error.state}", "error.message":"{error.message}" }

</Message>

</File>

</MessageLogging>

0 1 167
1 REPLY 1