We have a ISR Next.js setup running in Google Kubernetes Engine in Google Cloud with a persistent volume serving up built static files to two client pods. Every once in awhile (once a month it seems) a situation arises where the static files build fine, but a 404 is getting returned to the web client for the static chunk being requested. We are able to monitor logs from the API backend, but the logging for the Node.js server seems quite sparse. Some info we are interested in capturing:
- All requests to the Node.js server
- Every time the Node.js server has to restart
- Anytime a response is served up from any sort of Node.js-touching cache
Are there any best practices to logging --verbose to stdout for the Node.js server?