Recommendations for logging for Pages Functions

Since there is no persistent logs or error reporting, there’s no way built in way to know if anything is going wrong and if there is, there’s no way to find out what happened.

What are some recommendations for filling this (huge) gap?