Skip to content

Commit

Permalink
fix(logging): fix referencing values not present
Browse files Browse the repository at this point in the history
  • Loading branch information
open-dynaMIX committed Dec 24, 2019
1 parent 1ce27ba commit cf63945
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion webui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,13 @@ local function log_line(request, code, length)
return
end

local clientip = request['clientip'] or '-'
local path = request['request'] or '-'
local referer = request['referer'] or '-'
local agent = request['agent'] or '-'
local time = os.date('%d/%b/%Y:%H:%M:%S %z', os.time())
mp.msg.info(
request["clientip"]..' - - ['..time..'] "'..request['request']..'" '..code..' '..length..' "'..referer..'" "'..agent..'"')
clientip..' - - ['..time..'] "'..path..'" '..code..' '..length..' "'..referer..'" "'..agent..'"')
end

local function build_status_response()
Expand Down

0 comments on commit cf63945

Please sign in to comment.