On Mon, Apr 18, 2011 at 9:30 AM, Jordi Boggiano <j.boggi...@seld.be> wrote:
> On 18.04.2011 05:38, JC wrote:
>> I couldn't find references on the proper use to integrate a logger in
>> my code.
>> I tried the following inside a controller, but I didn't see any output
>> in the log file.
>>
>> Any ideas?
>>
>>     public function loginAction()
>>     {
>>       $logger = $this->get('logger');
>>                 .....
>>       $logger->info('loginName=');
>>       $logger->log('loginName=');
>>       ....
>>     }
>
> Sorry that was a little omission, for now you should be able to use
> $this->get('monolog.logger') to get what you want.
>
> I created a pull request [1] to fix this, so 'logger' should also work
> in the next preview release.

It's been merged, so now you should use logger and there is no more
monolog.logger. If you are using the preview release, just remember to
change that when you update to the next one (that hopefully comes
later today).

Cheers

-- 
Jordi Boggiano
@seldaek :: http://seld.be/

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to