title: symfony2 yaml: overwrite configuration
body: <p>I cannot get the symfony2 configuration to correctly overwrite values from other config-files. Here is the problem:</p>
  
  <p>I have a new environment "staging" where I want to use most of the stuff from config_prod.yml but have another logging level (I want it to be as it is in development, simply logging everything to a file). Here are the config stuff I use:</p>
  
  <p>config_prod.yml:</p>
  
  <pre><code>imports:
      - { resource: config.yml }
  
  monolog:
      handlers:
          main:
              type: fingers_crossed
              action_level: error
              handler: nested
          nested:
              type: stream
              path: %kernel.logs_dir%/%kernel.environment%.log
              level: debug
  </code></pre>
  
  <p>config_staging.yml:</p>
  
  <pre><code>imports:
      - { resource: config_prod.yml }
  
  monolog:
      handlers:
          main:
              type: stream
              path: %kernel.logs_dir%/%kernel.environment%.log
              level: debug
          nested: ~
  </code></pre>
  
  <p>From my point of view, the nested logger is now null and the main logs to the given file. <strong>What really happens is that he logs every message twice!</strong> The same happens when I use this for the config_staging.yml:</p>
  
  <pre><code>imports:
      - { resource: config_prod.yml }
  
  monolog:
      handlers:
          main:
              type: stream
              path: %kernel.logs_dir%/%kernel.environment%.log
              level: debug
              handler: ~
          nested: ~
  </code></pre>
  
  <p>I found a workaround, setting the action_level of the main handler to debug and leaving everything else as is, but I don't like this solution. There must be a way to overwrite config stuff so I only have the main monolog handler.</p>