1

I have this code:

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

Works fine in dev but it is ignored in production. How can I force to log this in production too?

Wouter J
  • 41,455
  • 15
  • 107
  • 112
dragonn
  • 79
  • 1
  • 10
  • when you encounter an error do you get a blank white page or do you get a status 500 message? and you may also want to edit you tag from 'symfon2' to 'symfony2'. could be the reason for low views count :P – some_groceries Oct 12 '15 at 07:57

1 Answers1

3

Take a look at your monolog config on app/config/config_prod.yml by default has as action level: error

monolog:
    handlers:
        main:
            type:         fingers_crossed
            action_level: error
            handler:      nested

See that for the full reference: http://symfony.com/doc/current/reference/configuration/monolog.html

Martijn
  • 15,791
  • 4
  • 36
  • 68
Jorge
  • 197
  • 7