michelsalib / BCCResqueBundle

The BCC resque bundle provides integration of php-resque to Symfony2. It is inspired from resque, a Redis-backed Ruby library for creating background jobs, placing them on multiple queues, and processing them later.
122 stars 91 forks source link

How to get resque log in Monolog? #132

Open winds1983 opened 9 years ago

winds1983 commented 9 years ago

How to get resque log in Monolog?

danhunsaker commented 9 years ago

Pretty sure BCCResque depends on PHP-Resque's dev-master version already, so you just need to set it up with Monolog as the Logger. The exact method for doing this is in the PHP-Resque README.

winds1983 commented 9 years ago

@danhunsaker Thanks, I was using it like this:

monolog:
    handlers:
        main:
            type:  stream
            path:  "%kernel.logs_dir%/%kernel.environment%.log"
            level: info
            handler: gelf
        resquelog:
            channels: ["bcc"]
            type: stream
            path: "%kernel.logs_dir%/%kernel.environment%_resque.log"
            level: info

I put above content to config_prod.yml, but cannot work. Because it seems just write resque log to redis, I do not know how to set it with Monolog in Symfony. https://github.com/chrisboulton/php-resque/blob/master/README.md Could you give me some sample?

winds1983 commented 9 years ago

Can you help me?