MessageLogging not working

Hi,

Using the PostClientFlow>Message Logging policy in the response flow (as per Apigee toturial etc) I have for Project A managed to log to file using the bellow policy settings...

If I apply the same for Project B...it does not work, while looking at the trace the policy is not even triggered.. any ideas on what could be the possible cause for this? Second project calls on Shared Flows and has more elaborate fault handling etc..but that should not matter right?

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<MessageLogging async="false" continueOnError="false" enabled="true" name="Message-Logging-1">
    <DisplayName>MessageLogging</DisplayName>
    <File>
        <Message defaultVariableValue="none">
            {
                "date/time":"{system.time.year}-{system.time.month}-{system.time.day} {system.time.hour}:{system.time.minute}:{system.time.second}",
                "User":"{accesstoken.UserId},
                "system.timestamp":"{system.timestamp}",
                "environment.name":"{environment.name}",
                "apiproxy.name":"{apiproxy.name}",
                "apiproxy.revision":"{apiproxy.revision}",
                "proxy.pathsuffix":"{proxy.pathsuffix}",
                "apigee.apiproduct.name":"{apigee.apiproduct.name}",
                "apigee.client_id":"{apigee.client_id}",
                "apigee.developer.app.name":"{apigee.developer.app.name}",
                "request.header.X-Forwarded-For":"{request.header.X-Forwarded-For}",
                "request.verb":"{request.verb}",
                "log.uuid":"{messageid}",
                "client.received.start.timestamp":"{client.received.start.timestamp}",
                "client.sent.end.timestamp":"{client.sent.end.timestamp}",
                "target.sent.start.timestamp":"{target.sent.start.timestamp}",
                "target.received.end.timestamp":"{target.received.end.timestamp}",
                "request.uri":"{request.uri}",
                "request.querystring":"{request.querystring}",
                "target.url":"{target.url}",
                "target.request.url":"{request.url}",
                "target.received.content.length":"{target.received.content.length}",
                "message.status.code":"{message.status.code}",
                "response.status.code":"{response.status.code}",
                "request.header.Accept":"{request.header.Accept}",
                "proxy.basepath":"{proxy.basepath}",
                "response_reason_phrase":"{message.reason.phrase}",
                "organization.name":"{organization.name}",
                "virtualhost.name":"{virtualhost.name}",
                "request.header.host":"{request.header.host}",
                "error.state":"{error.state}",
                "error.message":"{error.message}
            }
        
        </Message>
        <FileName>errorlog.log</FileName>
        <FileRotationOptions rotateLogFileOnStartup="false">
            <FileRotationType>TIME_SIZE</FileRotationType>
            <MaxFileSizeInMB>50</MaxFileSizeInMB>
            <MaxFilesToRetain>1</MaxFilesToRetain>
            <RotationFrequency unit="day">10</RotationFrequency>
        </FileRotationOptions>
    </File>
    <BufferMessage>true</BufferMessage>
    <logLevel>ERROR</logLevel>
</MessageLogging>
0 2 576
2 REPLIES 2

sidd-harth
Participant V

Hi @Jerry Jönsson, in the second proxy, are you calling the Message Logging policy through a Shared Flow in PostClientFlow?

No in both proxies I have it directly in the PostClientFlow..like this:

        <PostClientFlow name="PostClientFlow">
            <Response>
                <Step>
                    <Name>MessageLogging</Name>
                </Step>
            </Response>
            <Request/>
        </PostClientFlow>