slack-ruby / slack-ruby-bot-server

A library that enables you to write a complete Slack bot service with Slack button integration, in Ruby.
MIT License
268 stars 74 forks source link

Configuring Log Level #174

Closed dombarnes closed 1 year ago

dombarnes commented 1 year ago

I've had a look through the repo and can see the Loggable module setting up Logger, but i can't see anywhere set up to allow configuring logger.level via some config option (i.e. env variable).

Am I missing this or would i need to override SlackRubyBotServer::Loggable ClassMethods?

dombarnes commented 1 year ago

Self solve. Found I'd already configured it via an initializer in config/initializers/logger.rb SlackRubyBotServer::Service.logger.level = ENV.fetch('LOG_LEVEL', 'info').to_sym