# Logger.info in controller not working!

**URL:** <https://www.ruby-forum.com/t/logger-info-in-controller-not-working/137318>\
**Category:** Rails\
**Created:** [May 11, 2008, 11:57pm UTC](https://www.ruby-forum.com/t/logger-info-in-controller-not-working/137318 "2008-05-11T23:57:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![luke](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/7ab992/32.png) [@luke](https://www.ruby-forum.com/u/luke)\
**Post date:** [May 11, 2008, 11:57pm UTC](https://www.ruby-forum.com/t/logger-info-in-controller-not-working/137318/1 "2008-05-11T23:57:52Z")

</div>

Hi,

logger.info ‘test’ does not print anything to my log files when called  
from the controller. If I script/console and type the same line it  
does … I’ve searched online but I can’t find anything that can help  
me troubleshoot.

I’ve also tried @test = logger.methods

and then debugging @test in the view but I get a bank variable.

Any suggestions welcome.

Luke

---

<div class="post-metadata">

**Author:** ![luke](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/7ab992/32.png) [@luke](https://www.ruby-forum.com/u/luke)\
**Post date:** [May 12, 2008, 4:37am UTC](https://www.ruby-forum.com/t/logger-info-in-controller-not-working/137318/2 "2008-05-12T04:37:51Z")

</div>

Ah … okay that was silly. The problem was the line to write to the  
log was written after the line to render a view.
