From: Thufir Date: 2012-03-28T00:05:56+09:00 Subject: Re: ruby-net-nntp usage On Tue, 27 Mar 2012 18:21:30 +0900, Lars Mai wrote: > From the sources [1] it seems that you have to initialize the logger > manually. Try adding something like: > > nntp.logger = Logger.new 'mylog' > > before calling nntp.connect. Thanks, I looked at the source, and installed log4r, and looked at their webpage as well. I've tried variations, but get: thufir@dur:~/ruby/nntp$ thufir@dur:~/ruby/nntp$ nl nntp.rb 1 require 'rubygems' 2 require 'net/nntp' 3 nntp = Net::NNTP.new 4 Net::NNTP.logger = Logger.new 5 welcome = nntp.connect thufir@dur:~/ruby/nntp$ thufir@dur:~/ruby/nntp$ ruby nntp.rb /home/thufir/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/ rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead. nntp.rb:5:in `
': uninitialized constant Logger (NameError) thufir@dur:~/ruby/nntp$ thanks, Thufir