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:

PositionDataDescription
0Jan 9 20:51:28The date and time when the command completes its execution. This is represented in the HTTP date/time format.
1web-1234The server from where the Shell command is run.
2webappThe user who runs the Shell command.
315605The unique PID for the log.
4webappThe user who runs the Shell command.
5/home/webappThe path to the requested resource.
615588The unique PID for the process.
715588The ID for the entire session.
8prodThe stage of the site. For example, dev, prod.
9lsThe command that is run to get the Shell logs.
100The execution status or exit code of the command. For example, 0 is the status code for success.