title: symfony environment config files
body: <p>I use fosrestBundle with monolog logger to create a custom log.
  I added this conf in config_dev.yml :</p>
  
  <pre><code>monolog:
      handlers:
          main:
              type:         fingers_crossed
              action_level: error
              handler:      nested
          nested:
              type:  stream
              path:  "%kernel.logs_dir%/%kernel.environment%.log"
              level: debug
          console:
              type:  console
          myCustomLog:
              type:   stream
              path: "%kernel.logs_dir%/myCustomLog%kernel.environment%.log"
              channels: [myCustomLog]
  </code></pre>
  
  <p>So i did the same in my other environments config files (config_prod.yml, config_qualif.yml ...)</p>
  
  <p>The problem is that may config_prod or config_qualif are not used.</p>
  
  <p>I had this error :</p>
  
  <pre><code>PHP Fatal error:  Uncaught Symfony\\Component\\DependencyInjection\\Exception\\ServiceNotFoundException: You have requested a non-existent service "monolog.logger.myCustomLog". in /var/www/myWebSite/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php:816\nStack trace:\n#0 
  </code></pre>
  
  <p>I moved my monolog conf in the config.yml file and it works in all environments but this is not a good solution.</p>
  
  <p>Can you help me to understand how to correctly use environments config file, because i am not sure what i did is good ? And i am not sure fosrestbundle uses the right environments config file.</p>
  
  <p>My apache conf looks like this for prod environment:</p>
  
  <pre><code>ServerAdmin webmaster@localhost
  DocumentRoot /var/www/myWebSite/web
  &lt;IfModule dir_module&gt;
      DirectoryIndex app.php
  &lt;/IfModule&gt;
  
  &lt;Directory /var/www/myWebSite/web&gt;
      Options Indexes FollowSymLinks
      AllowOverride All
      Require all granted
      &lt;IfModule mod_rewrite.c&gt;
          Options +FollowSymlinks
          RewriteEngine On
          RewriteCond %{REQUEST_FILENAME} !-f
          RewriteRule ^(.*)$ /app.php [QSA,L]
      &lt;/IfModule&gt;
  &lt;/Directory&gt;
  </code></pre>
  
  <p>for qualif environment, the rewrite rules is :</p>
  
  <pre><code>        RewriteRule ^(.*)$ /app_qualif.php [QSA,L]
  </code></pre>
  
  <p>And in app.php i have this line :</p>
  
  <pre><code>$kernel = new AppKernel('prod', false);
  </code></pre>
  
  <p>And in app_qualif.php i have this line :</p>
  
  <pre><code>$kernel = new AppKernel('qualif', false);
  </code></pre>
  
  <p>thanks for your help</p>