monolog with different levels and environments
===

under app/config/config_dev.yml I have:

    monolog:                                                                                                              
        handlers:                                                                                                         
            main:                                                                                                         
                type: stream                                                                                              
                path: /var/log/dev.log                                                                                     
                level: debug 

and under  app/config/config_prod.yml I have:

    monolog:
        handlers:
            syslog:
                type: stream
                path: /var/log/prod.log
                level: error

In my controller I have 

    $logger = $this->get('logger');

    $logger->debug("foo");

I would expect to see the debug entry while in dev and only error and above entry when in prod.

But so far it's outputting everything. How can I adjust it so that different levels exists for different environments?