Permalink
Browse files

Only inject CommonLogger in development mode

  • Loading branch information...
1 parent 9300930 commit ef457ceac5d2f56bcee49916c024decd26eb3245 @evanphx evanphx committed Oct 16, 2012
Showing with 3 additions and 2 deletions.
  1. +2 −1 lib/puma/cli.rb
  2. +1 −1 lib/puma/configuration.rb
View
@@ -161,7 +161,8 @@ def setup_options
:debug => false,
:binds => [],
:workers => 0,
- :daemon => false
+ :daemon => false,
+ :environment => "development"
}
@parser = OptionParser.new do |o|
@@ -67,7 +67,7 @@ def app
end
end
- unless @options[:quiet]
+ if !@options[:quiet] and @options[:environment] == "development"
logger = @options[:logger] || STDOUT
app = Rack::CommonLogger.new(app, logger)
end

0 comments on commit ef457ce

Please sign in to comment.