Terminus plugin that:
- download site logs from a specific environment of a Pantheon sites
- parse the logs for debugging purposes
This will also pull logs on an environment with multiple containers.
Learn more about Terminus and Terminus Plugins at: https://pantheon.io/docs/terminus/plugins/
Download all logs from dev
.
terminus logs:get site_name.dev
Only download nginx-access.log and nginx-error.log logs.
terminus logs:get site_name.dev --nginx-access --nginx-error
Exclude nginx-access.log and nginx-error.log from download.
terminus logs:get site_name.dev --exclude --nginx-access --nginx-error
terminus logs:parse site_name.env --type=nginx-access --filter="301" --php
terminus logs:parse site_name.env --type=nginx-access --shell --grouped-by=ip
terminus logs:parse site_name.env --type=nginx-access --shell --grouped-by=response-code
terminus logs:parse site_name.env --type=nginx-access --shell --grouped-by=403
terminus logs:parse site_name.env --type=nginx-access --shell --grouped-by=404
terminus logs:parse site_name.env --type=nginx-access --shell --grouped-by=php-404
terminus logs:parse site_name.env --type=nginx-access --shell --grouped-by=php-404-detailed
terminus logs:parse site_name.env --type=nginx-access --shell --grouped-by=502
To get 502 URIs run this command first: terminus logs:parse site_name.env --type=nginx-access --shell --grouped-by=502
terminus logs:parse site_name.env --type=nginx-access --shell --grouped-by=ip-accessing-502 --uri={SITE_URI}
terminus logs:parse site_name.env --type=nginx-access --shell --grouped-by=request-per-second
terminus logs:parse site_name.env --type=nginx-access --shell --grouped-by=request-method --code=[200|403|404|502]
terminus logs:parse site_name.env --type=nginx-error --filter="access forbidden" --shell
terminus logs:parse site_name.env --type=nginx-error --filter="SSL_shutdown" --shell
terminus logs:parse site_name.env --type=php-error --filter="Uncaught PHP Exception" --php
terminus logs:parse site_name.env --type=all --filter="error" --php
terminus logs:parse site_name.env --type=php-slow --shell --grouped-by=latest
terminus logs:parse site_name.env --type=php-slow --shell --grouped-by=function
terminus logs:parse site_name.env --type=php-slow --shell --grouped-by=minute
terminus logs:parse site_name.env --type=mysql --shell
terminus logs:parse site_name.env --type=mysql --shell --grouped-by=time
terminus logs:list site_name.env
This plugin is not working on Windows environment. You may want to Dockerized your Terminus to use this kind of plugin that uses nix commands to parse the logs.
For help installing, see Manage Plugins
mkdir -p ~/.terminus/plugins
cd ~/.terminus/plugins
git clone https://github.com/geraldvillorente/terminus-site-debug.git
- To https://github.com/jfussion for the idea and initial codebase.