View the access and error logs from your Ghost site (not the CLI).
ghost log outputs the last 20 lines from the access log file for the site in the current folder.
Ghost's default log config creates log files in the
content/logs directory, and creates two different files:
- An access log that contains all log levels, named e.g.
- An error log that contains error-level logs only, named e.g.
The site descriptor follows the pattern
https__mysite_com__production. The files are be rotated, therefore you may see many numbered files in the
# View last 20 lines of access logs ghost log # View logs for a specific Ghost instance (use ghost ls to find the name) ghost log [name] # View logs for the Ghost instance called ghost-local ghost log ghost-local
ghost log --help for more detailed information.
# Show 100 log lines ghost log -n 100, ghost log --number 100 # Show only the error logs ghost log -e, ghost log --error # Show 50 lines of the error log ghost log -n 50 -e # Follow the logs (e.g like tail -f) ghost log -f, ghost log --follow # Follow the error log ghost log -fe # Show logs for the Ghost instance in a specific directory ghost log --dir /path/to/site/
There may be some output from Ghost that doesn't appear in the log files, so for debugging purposes you may also want to try the ghost run command.
If you have a custom log configuration the
ghost log command may not work for you. In particular the
ghost log command requires that file logging is enabled. See the logging configuration docs for more information.