lib/rcoli/utils.rb in rcoli-0.5.6 vs lib/rcoli/utils.rb in rcoli-0.5.7
- old
+ new
@@ -9,17 +9,28 @@
attr_accessor :debug
end
+ class Log
+
+ include Singleton
+
+ def initialize
+ @log = Logger.new(STDOUT)
+ @log.level = Logger::INFO
+ @log.formatter = proc do |severity, datetime, progname, msg|
+ "#{msg}\n"
+ end
+ end
+
+ def logger
+ @log
+ end
+
+ end
+
end
-@log = Logger.new(STDOUT)
-@log.level = Logger::INFO
-@log.formatter = proc do |severity, datetime, progname, msg|
- "#{msg}\n"
-end
-
def log
- @log
+ RCoLi::Log.instance.logger
end
-