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.

[1] https://github.com/symfony/symfony/pull/578

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