cinchrb / cinch

The IRC Bot Building Framework
http://www.rubydoc.info/gems/cinch
MIT License
1k stars 180 forks source link

Configure log_level from within configuration block #229

Open TheNotary opened 8 years ago

TheNotary commented 8 years ago

Looks like when the logging system was upgraded, the ability to set the default log level was lost. It would be handy to be able to set the default log level (if you wanted it to be quiet for instance, to :fatal) from within the configuration block.

test_master_bot = Cinch::Bot.new do
    configure do |c|
      c.nick = "testc"
      c.server = "127.0.0.1"
      c.channels = [ENV['irc_channel']]
      # c.verbose = false # lost
      c.log_level = :fatal
    end
  end
bougyman commented 7 years ago

The PR for this will be tested today.