lib/protonbot/log.rb in protonbot-0.1.2 vs lib/protonbot/log.rb in protonbot-0.1.3

- old
+ new

@@ -2,11 +2,11 @@ # @!attribute [rw] levels # @return [Hash<String>] Colorscheme # @!attribute [rw] logging # @return [Bool] If false, does not write messages. class ProtonBot::Log - attr_accessor :levels, :logging, :log_info + attr_accessor :levels, :logging def initialize @pastel = Pastel.new @queue = Queue.new @@ -15,11 +15,10 @@ @dfmt = '%d.%m.%Y' @tfmt = '%H:%M:%S' @levels = DEFAULT_SCHEME @logging = true - @log_info = false @stop = false lloop end @@ -34,14 +33,12 @@ # @!group Logging # @param msg [String] # @param nam [String] Name def info(msg, nam = 'log') - if @log_info - dat = gsub(msg.to_s, :info, nam) - @queue << dat - @pastel.strip(dat) - end + dat = gsub(msg.to_s, :info, nam) + @queue << dat + @pastel.strip(dat) end # @param msg [String] # @param nam [String] Name def debug(msg, nam = 'log')