How to get or filter only applications logs, the quick and dirty way.

I did not find any information about how to only show application logs and exclude the Azure environment logs, but they are a big part of the (in this case the function) application.

The filter used here is for the keywords from the Azure logs.

Example:

Kusto for removing or filtering it away.

The case-insensitive !contains string operator – Azure Data Explorer & Real-Time Analytics | Microsoft Learn

// Show application logs from Function Apps 
// A list of application logs, sorted by time (latest logs shown first). 
FunctionAppLogs 
| where Message !contains "Calling"
| where Message !contains "Response"
| where Message !contains "Request URL"
| where Message !contains "Environment"
| where Message !contains "DefaultAzure"
| where Message !contains "Managed"
| where Message !contains "DrainMode"
| where Message !contains "StopAsync"
| where Message !contains "Executed"
| where Message !contains "Calculate"
| where Message !contains "Response"
| project TimeGenerated, Message
| sort by TimeGenerated desc

The result is only the application logs, if not any of the words above match in app logs.