Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
edetmt
/
nginx-lua
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 8eeb53cd
authored
Apr 26, 2020
by
edetmt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update log format
1 parent
0647a0ee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
1 deletions
lib.lua
lib.lua
View file @
8eeb53c
...
...
@@ -54,7 +54,7 @@ function log_record(method,url,data,ruletag)
local
USER_AGENT
=
get_user_agent
()
local
SERVER_NAME
=
ngx
.
var
.
server_name
local
LOCAL_TIME
=
ngx
.
localtime
()
local
log_json_obj
=
CLIENT_IP
..
" "
..
LOCAL_TIME
..
" "
..
method
..
" "
..
url
..
" "
..
ruletag
..
"
\n
"
..
SERVER_NAME
..
" "
..
data
..
" "
..
USER_AGENT
local
log_json_obj
=
CLIENT_IP
..
" "
..
LOCAL_TIME
..
" "
..
method
..
" "
..
url
..
"
->
"
..
ruletag
..
"
\n
"
..
SERVER_NAME
..
" "
..
data
..
" "
..
USER_AGENT
local
LOG_LINE
=
log_json_obj
local
LOG_NAME
=
LOG_PATH
..
'/'
..
os.date
(
"%Y-%m-%d"
,
os.time
())
..
"_waf.log"
--local LOG_NAME = LOG_PATH..'/'.."waf.log"
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment