Sha256: 00893c3e96d3c5a659c05f8fd15eaddcfa3306be559204da453682c171b2c7c2
Contents?: true
Size: 484 Bytes
Versions: 7
Compression:
Stored size: 484 Bytes
Contents
require 'logger' module GeekDict class Debugger def initialize(enable=false) @enable = enable @logger = new_logger if enable end def debug(msg) @logger.debug msg if @enable end private def new_logger() Logger.new(STDOUT).tap do |l| l.datetime_format = '%Y-%m-%dT%H:%M:%S%z' l.formatter = proc do |severity, datetime, progname, msg| "#{datetime} : #{msg}\n" end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems