Forum: Ruby net/ssh makes log4r fail

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
19d0e6c6acf1337e1855dc1468ba1c89?d=identicon&s=25 Manish Sapariya (Guest)
on 2007-10-19 10:55
(Received via mailing list)
HI all,
For following code snippet, I get following error

$ ruby   log4rtest.rb
`outputters=': undefined method `clear' for nil:NilClass (NoMethodError)
        from ax.rb:7

I get similar error on windows, thought not exactly same.
D:\Temp>ruby   log4rtest.rb
log4rtest.rb:10: undefined method `outputters=' for #<Logger:0x2d46e88>

However, If I remove require 'net/ssh', the error goes away.
I am not sure in what way requiring net/ssh affect log4r

Any ideas.

require 'rubygems'
require 'log4r'
include Log4r
require 'net/ssh'

$logger = 'log4GS_Host'
$logger.outputters = Outputter.stdout

# Now we can log.
def do_log(log)
  $logger.debug "This is a message with level DEBUG"
088e7d6e4702562b92ace0023cf249dd?d=identicon&s=25 Luis Daniel (luis_d)
on 2014-02-25 00:58
Hi, I'm having the same trouble. Have you already solved it?
This topic is locked and can not be replied to.