lib/rubygoods/log.rb in rubygoods-0.0.0.10 vs lib/rubygoods/log.rb in rubygoods-0.0.0.12

- old
+ new

@@ -1,10 +1,23 @@ require "date" require "rainbow" module RG module Log + def self._queue + @queue = Queue.new + Thread.new do + loop do + puts @queue.pop + end + end + end + + def self._write(msg) + @queue << msg + end + def self.write(input, ln=true, color=true) msg = input.to_s datencstr = "%d.%m.%Y|%H:%M:%S" datestr = if color @@ -146,5 +159,7 @@ end Kernel.exit(code) end end end + +RG::Log._queue \ No newline at end of file