# Error with log4r?

**URL:** <https://www.ruby-forum.com/t/error-with-log4r/108367>\
**Category:** Rails\
**Created:** [July 2, 2007, 8:40pm UTC](https://www.ruby-forum.com/t/error-with-log4r/108367 "2007-07-02T20:40:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chirag](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecccb3/32.png) [@chirag](https://www.ruby-forum.com/u/chirag)\
**Post date:** [July 2, 2007, 8:40pm UTC](https://www.ruby-forum.com/t/error-with-log4r/108367/1 "2007-07-02T20:40:59Z")

</div>

I get the following ‘undefined method’ error with I use log4r (see  
below). I verified that the gem installed properly. Any ideas?

Chirag

NoMethodError in Raw data filesController#new

undefined method `outputters=’ for #Logger:0x4eb65b4

RAILS\_ROOT: ./script/…/config/…  
Application Trace | Framework Trace | Full Trace

#{RAILS\_ROOT}/app/controllers/raw\_data\_files\_controller.rb:20:in  
`halo_log4r' #{RAILS_ROOT}/app/controllers/raw_data_files_controller.rb:54:in`new’

* * *

def halo\_log4r  
config = {  
“filename” =\> “fu.log”,  
“maxsize” =\> 16000,  
“trunc” =\> true  
}

```
logger_fu = Logger.new 'myLog'

#alternate way of adding a file outputter
#out = RollingFileOutputter.new("myLog", config)
#logger_fu.add(out)

```

logger\_fu.outputters = RollingFileOutputter.new(“myLog”, config);  
logger\_fu.level = DEBUG  
logger\_fu.debug{ “params #{params} \n” }  
end
