Reference: Checking Logs
Users may wish to check logs for errors or other issues by following these steps:
Enter the following commands:
docker compose exec server bash cd ~/data/log
After this is done, users should be able to view logs the services produce
ls -al ls -al *.log
Users may also
grepfor specific items, etc.
ls -al *.log | grep http grep "error" *http* | more
Press Q to stop
moreAdditionally, users can tail the file and see the logs come in real time as an action is performed on the front-end:
tail -n 0 -f * tail -n 0 -f *http*
Press Control + C to stop tail
To download some log files:
docker compose exec server bash cd ~/data/log mkdir export_dir for file in $(ls -1 *.log | grep http); do cp "$file" export_dir; done ls export_dir/ tar -zcf export_dir.tar.gz export_dir/ rm -rf export_dir/ cd - #Back to the project directory mv ~/data/log/export_dir.tar.gz . exit mv ./export_dir.tar.gz ../ #Move the file out of the project folder exit #Remember to ssh back in and delete export_dir.tar.gz later scp -r -P 50001 <server_username>@<server_domain>:/home/esp/export_dir.tar.gz /Users/<your_username>/Downloads/
You can also do this outside of the container
docker compose logs --follow