Skip to content

Commit

Permalink
optimize code struct
Browse files Browse the repository at this point in the history
  • Loading branch information
dongs committed Jan 9, 2015
1 parent 5ed2904 commit 90b546a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion waf.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ local http_cookie = ngx.var.http_cookie
function log(module_name)
local http_user_agent = http_user_agent or "-"
local http_referer = http_referer or "-"
local line = string.format([[%s: %s [%s] "%s %s %s" "%s" "%s"]], module_name, remote_addr, localtime, request_method, request_uri, server_protocol, http_referer, http_user_agent )
local line = string.format([[%s: %s [%s] "%s %s %s" "%s" "%s"]] .. "\n", module_name, remote_addr, localtime, request_method, request_uri, server_protocol, http_referer, http_user_agent )
log_fd:write(line)
log_fd:flush()
end
Expand Down

0 comments on commit 90b546a

Please sign in to comment.