mirror of
https://github.com/ADD-SP/ngx_waf.git
synced 2026-04-26 14:05:52 +03:00
[GH-ISSUE #39] 拦截日志能单独定义一个文件吗 #156
Labels
No labels
MacOS
Nginx
OpenResty
Tengine
bug
documentation
enhancement
needs-investigation
pull-request
question
stale
stale
stale
timeout
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ngx_waf#156
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @opcache on GitHub (May 10, 2021).
Original GitHub issue: https://github.com/ADD-SP/ngx_waf/issues/39
建议
@ADD-SP commented on GitHub (May 10, 2021):
本模块提供有限的自定义日志格式功能。
日志 | ngx_waf
@opcache commented on GitHub (May 10, 2021):
access_log logs/access.yml yaml if=$waf_log;
这样使用,还是有非拦截的日志在里面
@ADD-SP commented on GitHub (May 10, 2021):
内置变量 | ngx_waf
可以通过判断内置变量
waf_blocked的值,然后设置一个自定义变量来实现仅记录拦截日志的功能。@opcache commented on GitHub (May 10, 2021):
这样试了,logs/access.yml没拦截日志了
@ADD-SP commented on GitHub (May 10, 2021):
我今天新增一个变量用来解决这个需求吧,到时候我更新在 beta 版里,更新了之后我会在这里回复。
@opcache commented on GitHub (May 10, 2021):
好的,thx
@ADD-SP commented on GitHub (May 10, 2021):
新增了一个变量,请下载最新的 beta 版本。按照 日志 | ngx_waf 所示进行操作。
@ADD-SP commented on GitHub (May 16, 2021):
v5.3.0 已经发布,如测试后无问题请关闭本 issue。