From 8d101552f3fb54a2050a30140c753b6939fb3bf9 Mon Sep 17 00:00:00 2001 From: Ben Hollis Date: Thu, 10 May 2012 22:12:55 -0700 Subject: [PATCH] Log to NUL: in Windows because apparently that's their name for /dev/null. Fixes #421 --- middleman-core/lib/middleman-core/core_extensions/request.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/middleman-core/lib/middleman-core/core_extensions/request.rb b/middleman-core/lib/middleman-core/core_extensions/request.rb index cb706668..33eabf7f 100644 --- a/middleman-core/lib/middleman-core/core_extensions/request.rb +++ b/middleman-core/lib/middleman-core/core_extensions/request.rb @@ -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 \ No newline at end of file +end