graphiti-api / graphiti-rails

MIT License
54 stars 28 forks source link

Do not enable the debugger if the user has explicitly disabled it #37

Closed wilsonsilva closed 4 years ago

wilsonsilva commented 4 years ago

I and my team spent quite some time trying to disable Graphiti's logger using the environment variable GRAPHITI_DEBUG=false and the configuration block:

Graphiti.configure do |config|
  config.debug = false
end

But the logger was still printing debug statements because the debugger is forcefully turned on if the Rails debugger level is 0. This change allows the debugger to be turned off.

Complementary PR: https://github.com/graphiti-api/graphiti/pull/174