Programmierung Ruby Logger Singleton
Sometimes you might want a Singleton Logger in Ruby. Here is what works:
require 'logger'
require 'singleton'
class Logger
include Singleton
@@old_initialize = Logger.instance_method :initialize
def initialize
@@old_initialize.bind(self).call(STDERR)
end
end