The log messages generated by the different tasks running on an application
container can be accessed via the
1 2 3 4 5 6 7 8 9
# display all messages from all log files $ symfony log all # display the messages of a specific log file # (the argument is the name of the log file without the '.log' extension) $ symfony log error # display the messages of several log files $ symfony log app error
As explained in the next sections, the exact log files available depend on the application container in use. Log rotation is not enabled by default, but each log file is limited to 10 MB in size automatically because log files are counted towards your disk quota (if a log file reaches that size limit, older messages are discarded).
In addition to the
log command, log files are also accessible via SSH
/var/log directory of the application container.
/var/log directory is writable, it should not be written
to directly. Only write to it via standard logging mechanisms, such as your
application's logging facility.
deploy log contains the output of the most recent runs of the
deploy hook for the container. If there is no
hook then this file will be absent.
Any log messages generated by the application will be sent to this file. That
includes language errors such as PHP Errors, Warnings, and Notices, as well as
uncaught exceptions. It also contains your application logs if you log on
When running a Symfony application, the
log command also gives access to
the log files stored under
# tail on /app/app/logs/prod.log $ symfony log prod
cron log contains the output of all recent executions of
cron jobs. If there is no cron hook specified in the
container configuration or if no cron has been executed yet, then this file will
On a PHP container, the
php.access contains a record of all requests to the
This is the raw access log for the nginx instance running on the application container. That is, it does not include any requests that return a redirect or cache hit from the router.
Nginx-level errors that occur once nginx has fully started will be recorded
here. This will include HTTP 500 errors for missing directories, file types
that are excluded based on the
.symfony.cloud.yaml file, etc.
Nginx startup log messages will be recorded in this file. It rarely happens except when debugging possible nginx configuration errors.
This work, including the code samples, is licensed under a Creative Commons BY-SA 3.0 license.