You're viewing Apigee Edge documentation.
Go to the
Apigee X documentation. info
In the previous step, you logged a static message that said "This is a test". A more realistic use case is logging the value of a message flow variable in an API proxy flow.
In this step, you'll log your client IP address, which is a property of the client
flow variable.
To log your client IP address with your extension:
- In the API proxy editor, select the Develop tab.
- Click your extension logging policy and change the value of
message
:FROM: "message": "This is a test" TO: "message": "Client IP: {client.ip}"
- Save the proxy.
- Select the Trace tab.
- Click Start Trace Session, and click Send.
- Open the GCP console and go to Logging.
- Select the following:
- Global
- example-log
- Last Hour
You should see a log entry with your client IP address.
- To delete Stackdriver log entries and start fresh, see gcloud beta logging logs delete.
Next step
That's it! You're done for now. Go get a snack.