API to access serverless function logs

It would be great if it is possible to access the serverless function logs via the API.
There are a few use cases I can come up with:

1. Developer MCP

* Enable Product Owners/Colleges/Developers to quickly identify issues and apply mitigations leveraged by AI

2. Cloning into existing logging frameworks

* Allow developers to integrate the logs into existing monitoring frameworks to prevent domain switches and improve accident response time