Log to NUL: in Windows because apparently that's their name for /dev/null. Fixes #421

This commit is contained in:
Ben Hollis 2012-05-10 22:12:55 -07:00
parent 024d33c16e
commit 8d101552f3

View file

@ -146,7 +146,7 @@ module Middleman
opts[:app] = app_class
require "webrick"
opts[:Logger] = WEBrick::Log::new("/dev/null", 7) if !options[:logging]
opts[:Logger] = WEBrick::Log::new(RUBY_PLATFORM =~ /(mingw|bccwin|wince|mswin32)/i ? 'NUL:' : '/dev/null', 7) if !options[:logging]
opts[:server] = 'webrick'
server = ::Rack::Server.new(opts)
@ -370,4 +370,4 @@ module Middleman
end
end
end
end
end