Connecting An Azure Function App to Loggly
Doing the following will get a Function App hooked up to Loggly.
- Create an Event Hub namespace, and an Event Hub.
- Create a Function App, and an Event Hub function.
- Create a Loggly HTTP/S Event Endpoint, and get the URL endpoint.
- Update the Event Hub trigger with this code (use test to verify)
- Create a HTTP Trigger function.
- In the Function App’s diagnostic settings, turn on FunctionAppLogs and stream to the Event Hub.
- Call the HTTP trigger endpoint and verify results in Loggly.
Reference
https://www.loggly.com/blog/how-to-stream-logs-from-azure-resources-to-loggly/