Runtime logs in Cloud Logger

I can only see the deployment logs in ApigeeX but not runtime logs. I've tried adding the MessageLogging policy  as PreFlow and PostFlow to the proxy. The deployment fails with a general error 

" instance "usw2-instance" reported error entities.ConfigurationFailed: "Configuration failure: Caused by: java.lang.IndexOutOfBoundsException: Index: 0\n\tat java.base/java.util.Collections$EmptyList.get(Collections.java:4483)\n\tat java.base/java.util.Collections$UnmodifiableList.get(Collections.java:1310)\n\tat com.apigee.syslogger.SysLogger.<init>(SysLogger.java:57)\n\tat"

Solved Solved
3 3 112
1 ACCEPTED SOLUTION

That seems like a bug. Apigee should never generate an error like that. 

You should contact Apigee support with that information.  Or, if you don't have a support contract., post the contents of your messagelogging policy configuration. And I can try to file a bug on your behalf. 

Just guessing, but it seems like you have misconfigured something. Even so, Apigee should tolerate that , and should issue an appropriate error message, rather that showing you a stacktrace.

Have you tried running  apigeelint on your proxy?  It may provide more diagnostic information. 

View solution in original post

3 REPLIES 3

That seems like a bug. Apigee should never generate an error like that. 

You should contact Apigee support with that information.  Or, if you don't have a support contract., post the contents of your messagelogging policy configuration. And I can try to file a bug on your behalf. 

Just guessing, but it seems like you have misconfigured something. Even so, Apigee should tolerate that , and should issue an appropriate error message, rather that showing you a stacktrace.

Have you tried running  apigeelint on your proxy?  It may provide more diagnostic information. 

Hi

Thank you. I haven't tried apigeelint yet. Here's the policy I am trying to apply. 

 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<MessageLogging continueOnError="false" enabled="true" name="Message-Logging-2">
<DisplayName>Message Logging-2</DisplayName>
<CloudLogging>
<LogName>projects/test/logs/apigee-logs</LogName>
<Message contentType="application/json">{"x-request-id": "{messageid}",
"organization": "test-organization",
"environment": "environment_name",
"apiProxyName": "apiproxy-name",
"apiProxyRevision": "apiproxy-revision",
"request": {"uri": "{request.uri}","method":"{request.verb}"},
"response":{"statusCode":"{message.status.code}"}
}</Message>
<ResourceType>api</ResourceType>
</CloudLogging>
<logLevel>INFO</logLevel>
</MessageLogging>
 
 
Thanks

Spurthy, can you please check the service account permissions you're using to deploy?