It seems that simply having the policy as a file, even if it’s commented out and not actively used, causes issues with the Cloud Code VSCode Extension Apigee emulator. I have to delete the XML policy file for the emulator to function correctly.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<MessageLogging name="ML-CloudLogging-API-Activity" continueOnError="true" enabled="true">
<DisplayName>ML-CloudLogging-API-Activity</DisplayName>
<CloudLogging>
<LogName>projects/logs</LogName>
<Message contentType="application/json">{
"timestamp": "{system.time}",
"debug": "Cloud logging test message"
}</Message>
<ResourceType>global</ResourceType>
</CloudLogging>
<logLevel>INFO</logLevel>
</MessageLogging>
giving this error
07/09/2025 2:45 PM EMULATOR ERROR Code : entities.ConfigurationFailed
07/09/2025 2:45 PM EMULATOR ERROR Message: Configuration failure: Caused by: java.lang.NullPointerException
at com.apigee.steps.messagelogging.destinations.CloudLoggingDestination.createLoggingSettingsBuilder(CloudLoggingDestination.java:138)
at com.apigee.steps.messagelogging.destinations.CloudLoggingDestination.<init>(CloudLoggingDestination.java:100)
at com.apigee.steps.messagelogging.destinations.CloudLoggingDestinationFactory.getInstance(CloudLoggingDestinationFactory.java:71)
at com.apigee.steps.messagelogging.destinations.DestinationRegistry.newDestination(DestinationRegistry.java:50)
more...
