module Legion module Logging module Methods def debug(message = nil, log = @log) message = yield if message.nil? && block_given? message = Rainbow(message).blue if @color log.debug(message) end def info(message = nil, log = @log) message = yield if message.nil? && block_given? message = Rainbow(message).green if @color log.info(message) end def warn(message = nil, log = @log) message = yield if message.nil? && block_given? message = Rainbow(message).yellow if @color log.warn(message) end def error(message = nil, log = @log) message = yield if message.nil? && block_given? message = Rainbow(message).red if @color log.error(message) end def fatal(message = nil, log = @log) message = yield if message.nil? && block_given? message = Rainbow(message).darkred if @color log.fatal(message) end def unknown(message = nil, log = @log) message = yield if message.nil? && block_given? message = Rainbow(message).purple if @color log.unknown(message) end end end end