symfony 2.4在prod环境中无法获得理论渠道 [英] symfony 2.4 can't get the doctrine channel in prod environment

查看:170
本文介绍了symfony 2.4在prod环境中无法获得理论渠道的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在使用




  • symfony / symfony v2.4.6

  • symfony / monolog-bundle v2.6.0

  • 常见的v2.4.2



这是我在 config_prod.yml 中的monolog配置:

  monolog:
处理程序:
doctrine:
bubble:false
action_level :DEBUG
type:stream
path:%kernel.logs_dir%/%kernel.environment%_doctrine.log
channels:doctrine
security:
bubble: false
action_level:DEBUG
type:stream
path:%kernel.logs_dir%/%kernel.environment%_security.log
channels:security
request:
泡沫:false
action_level:DEBUG
类型:流
路径:%kernel.logs_dir%/%kernel.environment%_request.log
channels:request
main :
type:stream
path:%kernel.logs_dir%/%kernel.environment%.log
level:debug
channels:[!doctrine,!安全性,!请求]

这是我的整个教条配置在 config.yml

  doctrine:
dbal:
driver:% database_driver%
主机:%database_host%
端口:%database_port%
dbname:%database_name%
用户:%database_user%
密码:%database_password%
charset:UTF8
orm:
auto_generate_proxy_classes:%kernel.debug%
auto_mapping:true

我有3个文件

  ../../../ logs / prod.log 
../../../logs/prod_request.log
../../../logs/prod_security。 log

我无法设法获取 prod_doctrine.log



我尝试了同一个文件 prod.log 中的所有频道。我有所有频道都没有,除了教义...



什么可以防止学说的记录?是否有与我的版本不兼容?

解决方案

设置 doctrine.dbal.logging true 以启用生产原则日志记录。


I can't manage to get a log of the doctrine channel in my prod environment.

I'm using

  • symfony/symfony v2.4.6
  • symfony/monolog-bundle v2.6.0
  • doctrine/common v2.4.2

Here is my monolog config in config_prod.yml:

monolog:
    handlers:
        doctrine:
            bubble: false
            action_level: DEBUG
            type:  stream
            path:  "%kernel.logs_dir%/%kernel.environment%_doctrine.log"
            channels: doctrine
        security:
            bubble: false
            action_level: DEBUG
            type:  stream
            path:  "%kernel.logs_dir%/%kernel.environment%_security.log"
            channels: security
        request:
            bubble: false
            action_level: DEBUG
            type:  stream
            path:  "%kernel.logs_dir%/%kernel.environment%_request.log"
            channels: request
        main:
            type:  stream
            path:  "%kernel.logs_dir%/%kernel.environment%.log"
            level: debug
            channels: ["!doctrine", "!security", "!request"]

Here is my whole doctrine config in config.yml:

doctrine:
    dbal:
        driver:   %database_driver%
        host:     %database_host%
        port:     %database_port%
        dbname:   %database_name%
        user:     %database_user%
        password: %database_password%
        charset:  UTF8
    orm:
        auto_generate_proxy_classes: %kernel.debug%
        auto_mapping: true

I have the 3 files

../../../logs/prod.log
../../../logs/prod_request.log
../../../logs/prod_security.log

I can't manage to get prod_doctrine.log.

I tried all the channels in the same file prod.log. I had all channels alright, except doctrine...

What can prevent the logging of doctrine? Is there some incompatibility with my versions?

解决方案

Set doctrine.dbal.logging to true to enable production doctrine logging.

这篇关于symfony 2.4在prod环境中无法获得理论渠道的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆