Symfony 1.4被设置为我的Apache配置中唯一的虚拟主机。我应该使用Apache访问日志和错误日志还是symfony会为我处理这两个问题?
答案 0 :(得分:1)
Apache日志与symfony提供的日志记录不同。 Apache日志除了symfony之外还有其他原因。我通常使用以下虚拟主机配置进行本地开发。
<VirtualHost *:80>
ServerName dev.yoursite.com.br
DocumentRoot "/home/you/dev/sfprojects/yoursite/web"
DirectoryIndex index.php
<Directory "/home/you/dev/sfprojects/yoursite/web">
AllowOverride All
Allow from All
</Directory>
Alias /sf /home/you/dev/sfprojects/yoursite/lib/vendor/symfony/data/web/sf
<Directory "/home/you/dev/sfprojects/yoursite/lib/vendor/symfony/data/web/sf">
AllowOverride All
Allow from All
</Directory>
ErrorLog "/home/you/dev/sfprojects/yoursite/log/error.log"
CustomLog "/home/you/dev/sfprojects/yoursite/log/web.log" combined
</VirtualHost>
对于symfony,我像以下
一样配置factories.ymldev:
logger:
class: sfAggregateLogger
param:
level: notice
loggers:
sf_file_err:
class: sfFileLogger
param:
level: err
file: %SF_LOG_DIR%/%SF_APP%_%SF_ENVIRONMENT%_error.log
sf_file_notice:
class: sfFileLogger
param:
level: notice
file: %SF_LOG_DIR%/%SF_APP%_%SF_ENVIRONMENT%_notice.log