1
Symfony 1.4被設置爲我的Apache配置中唯一的虛擬主機。我應該使用Apache訪問日誌和錯誤日誌還是symfony爲我處理這些問題?symfony 1.4和Apache訪問/錯誤日誌
Symfony 1.4被設置爲我的Apache配置中唯一的虛擬主機。我應該使用Apache訪問日誌和錯誤日誌還是symfony爲我處理這些問題?symfony 1.4和Apache訪問/錯誤日誌
Apache日誌不同於symfony提供的日誌記錄。除了symfony的其他原因,Apache日誌也很有用。我通常爲我的本地開發使用以下虛擬主機配置。
<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>
爲symfony1.2,我配置一樣factories.yml中以下
dev:
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
我也覺得很有用'sfFileLogger'隨着產量的'err'水平。 – prodigitalson