Cloud Platform

Shell logs

The Shell log records all commands that are executed by the application user. This includes SSH, cron, or user commands when executed in context of the site. This log is specific to Cloud Classic environments. It has a predefined format and can run Python, script, binary, or PHP.

Parsing the log file

The following line is a representative example of the data written into your website's Shell log:

Jan 9 20:51:28 web-1234 webapp[15605]: {"user": "webapp", "path": "/home/webapp", "pid": "15588", "user_session_id": "15588", "stage": "prod", "command": "ls", "status": "0"}

Each of the items in the Shell log is noted in the following table, along with its description:

Position FieldExampleDescription
0date/timeJan 9 20:51:28The date and time when the command completes its execution. This is represented in the HTTP date/time format.
1serverweb-1234The server from where the Shell command is run.
2userwebappThe user who runs the command.
3pid15605The unique PID for the log.
4userwebappThe user who runs the command.
5path/home/webappThe working directory for the command.
6pid15588The PID (process ID) for the command that is run.
7user_session_id15588The PID (process ID) for the Shell session that ran the command.
8stageprodThe stage of the site. For example, dev, prod.
9commandlsThe full command.
10status0The execution status or exit code of the Shell command. For example, 0 is the status code for success.