shardlab / discordrb

Discord API for Ruby
MIT License
538 stars 99 forks source link

Annoying log message #239

Open sebackend opened 1 year ago

sebackend commented 1 year ago

First of all, thank you very much for the project. Currently, I am only using this gem to create notifications in a text channel, and it works like a charm 👌

The problem is that every time I run a Rails command, I get this annoying message, and I can't find a way to remove it (it's even appearing in the production logs).

Using WSCS version: 0.3.1

Example running rails server

Captura de Pantalla 2023-10-05 a la(s) 15 17 20

Environment

Ruby version:

ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-darwin20]

Discordrb version:

discordrb (3.2.1) discordrb-webhooks (3.2.0.1)

Rails version: Rails 5.1.7

rishijain commented 1 year ago

I could not reproduce this locally. This is what I did: 1) Added the discordrb gem in the Gemfile, bundle install. 2) rails s

I was expecting the message that you are reporting but I did not see it. I am guessing you must be initializing the discordrb configuration during the boot time of the rails application, so you get the message.

The message from what I understood come from this file and this line specifically.

Since it is using the debug level of the logger to add that information, it could be possible that you have either set the log_level to debug or not set anything and in that case debug is the default level.

If you can set this to info, you should not see that line in the logs anymore.

You can read more about leg levels here.

swistak commented 6 months ago

The message appears because your logger is set to debug. It wont' show up in production.