From: Ben Giddings Date: 2003-08-29T06:19:39+09:00 Subject: Re: Log4r with Ruby 1.8 Stephan K�mper wrote: > C:/RUBY/lib/ruby/site_ruby/1.8/log4r/formatter/formatter.rb:58:in > `sprintf': unnumbered(1) mixed with numbered (ArgumentError) It has to do with how the author of Log4r implemented his sprintfs. Apparently you can number your parameters or not, but you can't mix them: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/663 In this case, the solution is to change this: class SimpleFormatter < Formatter @@simpleformat = "%*4$s %s> %s\n" def format(event) sprintf @@simpleformat, LNAMES[event.level], event.name, event.data, MaxLevelLength end end to this: class SimpleFormatter < Formatter @@simpleformat = "%*4$1$s %2$s> %3$s\n" def format(event) sprintf @@simpleformat, LNAMES[event.level], event.name, event.data, MaxLevelLength end end and this: class BasicFormatter < SimpleFormatter @@basicformat = "%*3$s %s" to this: class BasicFormatter < SimpleFormatter @@basicformat = "%*3$1$s %2$s" in log4r/formatter/formatter.rb I'm not sure if the author is still actively maintaining Log4r, but if he is, someone should ask him to update this, as well as start using #class rather than #type. His code spits out a lot of warnings because of this. Ben