Do it yourself
#Read the app's logs
#-
Open the project menu (☰ and the project name, at the top left), choose Terminal, then New PROD terminal for the published app or New DEV terminal for the preview.
-
Show the last 200 lines of the backend:
sudo journalctl -u playcode-backend -n 200 --no-pager -
Watch new lines as they arrive, then stop with Ctrl+C:
sudo journalctl -u playcode-frontend -f -
Show the last 5 minutes of every app service:
sudo journalctl -u 'playcode-*' --since '5 min ago'
Read the build log of a publish
#- Open Publish and choose View publish progress.
- Open Build details. When a publish fails, it opens by itself, under What went wrong.
- Choose Download log to save the whole log as a file.
If it doesn't work
#"Publish the project first to open a PROD terminal."
#The production computer exists only after the first publish. Publish the app, or read the development logs.
The log is empty or starts recently
#The computer restarted, and a restart clears the logs. A restore, a change of computer size and a restart all do this.
"No entries" for playcode-backend
#The project may run its services under other names. List them with systemctl list-units 'playcode-*', or ask the agent to find them.
"This run's log is no longer available."
#Playcode could not load the build log of that publish. Publish again to get a fresh log, or ask a person if the problem stays.
Limits
#- A computer keeps its logs in memory, up to 32 MB. A restart clears them; sleep does not.
- The development and production computers have separate logs.
- A log holds whatever your code prints. Do not print secrets or customer data.
- A static site has no server, so it has no server logs: its code runs in the visitor's browser.