@Sai Praneeth Eranti Thank you for reaching out.
You can achieve the above using GUI or CLI or Bicep
https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/how-to-server-logs-cli
there are two parts here
- Configuring the logs for Log Analytics (LA)
- One time setup
- Can be done via Portal, CLI, Bicep
- One time setup
- Query the logs via KQL
- Querying has to be done via any Kusto client (Azure portal, Kusto explorer, PowerShell etc.)
Regards,
Oury