1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

Fixed SystemCallError for Windows path

This commit is contained in:
nrakochy 2016-03-19 10:29:47 -05:00
parent 92d149d4cf
commit 451af05481

View file

@ -47,7 +47,8 @@ module Sidekiq
end
def self.logger=(log)
@logger = (log ? log : Logger.new('/dev/null'))
null_path = (File.exists?('/dev/null') ? '/dev/null' : 'nul')
@logger = (log ? log : Logger.new(null_path))
end
# This reopens ALL logfiles in the process that have been rotated