diff --git a/lib/tugboat/middleware/custom_logger.rb b/lib/tugboat/middleware/custom_logger.rb
index <HASH>..<HASH> 100644
--- a/lib/tugboat/middleware/custom_logger.rb
+++ b/lib/tugboat/middleware/custom_logger.rb
@@ -26,7 +26,7 @@ module Tugboat
       private
 
       def filter(output)
-        unless ENV['DEBUG'] == '2'
+        if ENV['DEBUG'].to_i == 2
           output = output.to_s.gsub(/client_id=[a-zA-Z0-9]*/,'client_id=[CLIENT-ID]')
           output = output.to_s.gsub(/api_key=[a-zA-Z0-9]*/,'api_key=[API-KEY]')
           output = output.to_s.gsub(/_digitalocean2_session_v2=[a-zA-Z0-9%-]*/,'_digitalocean2_session_v2=[SESSION_COOKIE]')
Change logic around detection of filtering logs

Before logic was dependant on environment variables being strings, this is much better :<I>: