# File lib/puppet/network/http_server/webrick.rb, line 40 40: def httplog 41: args = [] 42: 43: # yuck; separate http logs 44: file = nil 45: Puppet.settings.use(:main, :ssl, Puppet[:name]) 46: if Puppet.run_mode.master? 47: file = Puppet[:masterhttplog] 48: else 49: file = Puppet[:httplog] 50: end 51: 52: # open the log manually to prevent file descriptor leak 53: file_io = open(file, "a+") 54: file_io.sync 55: file_io.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) 56: 57: args << file_io 58: args << WEBrick::Log::DEBUG if Puppet[:debug] 59: 60: log = WEBrick::Log.new(*args) 61: 62: 63: log 64: end