Question

Log files on App Platform

I want to host my Nextjs app on App Platform .My question is, how can i access logfiles created by Winston in the root directory of my project ? Is there a way to access such path approot/logs/error.log ?


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hello,

You can view your application logs by following the steps here:

https://docs.digitalocean.com/products/app-platform/how-to/view-logs/

I personally like the doctl command-line tool and I use the command from the documentation to do so:

doctl apps logs <app id> <component name> --deployment <deployment id> --type <type value>

If you decide to store your logs inside the App component, you need to keep in mind that the storage is not persistent, so during your next deployment, the log will be lost.

For more information on persistent storage, I would recommend going through this documentation here:

https://docs.digitalocean.com/products/app-platform/how-to/store-data/

Hope that this helps. Regards, Bobby