0
votes

Just trying to set up production logging on a Symfony 1.4 site (yes we've told them to upgrade).

It's logging as expected for public, but it's not generating a file or any logs for admin.

This is my settings.yml in apps/admin/config:

prod:
    .settings:
        no_script_name:         false
        logging_enabled:        true

And this is my factories.yml in apps/admin/config:

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

It's exactly the same in apps/public/config and that's logging fine.

1

1 Answers

0
votes

Most probably level set to err is too high for what you want to see in the logs under the admin app. You can probably try to lower it to warning or notice in order to see more information in the logs. Check documentation for all available levels.

Also remember that in prod, depending on the traffic, you might have a lot of info logged so your log file could get big quickly!

Make sure to clear the cache after each config change as that's the root cause for 90% of issues with symfony1 :)