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 38fe0955
authored
Apr 24, 2020
by
edetmt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
logs date
1 parent
58af5829
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
1 deletions
lib.lua
lib.lua
View file @
38fe095
...
@@ -56,7 +56,7 @@ function log_record(method,url,data,ruletag)
...
@@ -56,7 +56,7 @@ function log_record(method,url,data,ruletag)
local
LOCAL_TIME
=
ngx
.
localtime
()
local
LOCAL_TIME
=
ngx
.
localtime
()
local
log_json_obj
=
CLIENT_IP
..
" "
..
LOCAL_TIME
..
" "
..
method
..
" "
..
url
..
" "
..
config_set_ip_addr
..
" "
..
SERVER_NAME
..
" "
..
USER_AGENT
..
" "
..
data
..
" "
..
ruletag
local
log_json_obj
=
CLIENT_IP
..
" "
..
LOCAL_TIME
..
" "
..
method
..
" "
..
url
..
" "
..
config_set_ip_addr
..
" "
..
SERVER_NAME
..
" "
..
USER_AGENT
..
" "
..
data
..
" "
..
ruletag
local
LOG_LINE
=
log_json_obj
local
LOG_LINE
=
log_json_obj
local
LOG_NAME
=
LOG_PATH
..
'/'
..
ngx
.
today
(
)
..
"_waf.log"
local
LOG_NAME
=
LOG_PATH
..
'/'
..
os.date
(
"%Y-%m-%d"
,
os.time
()
)
..
"_waf.log"
--local LOG_NAME = LOG_PATH..'/'.."waf.log"
--local LOG_NAME = LOG_PATH..'/'.."waf.log"
local
file
=
io.open
(
LOG_NAME
,
"a"
)
local
file
=
io.open
(
LOG_NAME
,
"a"
)
if
file
==
nil
then
if
file
==
nil
then
...
...
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