Symfony-check

Check if your symfony application is ready for deployment

Log errors
  • high
  • security

Error logs are a precious help to find what goes wrong on your production server.

In apps/frontend/config/settings.yml, activate the option:

prod:
  .settings:
    logging_enabled:    true

Then, in apps/frontend/config/factories.yml:

prod:
  logger:
    class: sfAggregateLogger
    param:
      level: err
      loggers:
        sf_file_debug:
          class: sfFileLogger
          param:
            level: err
            file: %SF_LOG_DIR%/%SF_APP%_%SF_ENVIRONMENT%.log

Clear your cache.

php symfony cc

Don't forget to set up a cron dedicated to the log rotation.

Read the related symfony documentation.