社区
Web 开发
帖子详情
如何设定access log中的authenticated username?
rottenapple
2009-11-09 03:01:49
在阿帕奇的web access log中,有一个是用户名选项,默认是域用户名。如果我用的是form 方式登陆,想把这个用户名写到access log中怎么实现?
...全文
58
6
打赏
收藏
如何设定access log中的authenticated username?
在阿帕奇的web access log中,有一个是用户名选项,默认是域用户名。如果我用的是form 方式登陆,想把这个用户名写到access log中怎么实现?
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
6 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
swandragon
2009-11-10
打赏
举报
回复
不知道,没弄过这东西
rottenapple
2009-11-10
打赏
举报
回复
没人知道么?不会把!!!
rottenapple
2009-11-09
打赏
举报
回复
楼上的, 现在的access log 是这样的
2009-07-04 02:16:37 110.110.110.246 Domain\UserName 110.110.110.110 GET /images/btn_news.gif - 200 0 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.1;+SV1;+Core+4.1.0;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.04506.30;+.NET+CLR+3.0.04506.648;+.NET+CLR+3.5.21022)
我需要的是
2009-07-04 02:16:37 110.110.110.246 form_username 110.110.110.110 GET /images/btn_news.gif - 200 0 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.1;+SV1;+Core+4.1.0;+.NET+CLR+1.1.4322;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.04506.30;+.NET+CLR+3.0.04506.648;+.NET+CLR+3.5.21022)
JavaAlpha
2009-11-09
打赏
举报
回复
不太明白 楼主的意思
youjianbo_han_87
2009-11-09
打赏
举报
回复
这个没做过,去官方网站上下他的sample的,肯定会有例子的。
阁楼上的伟哥
2009-11-09
打赏
举报
回复
这个不太懂……
顶一下
jboss
中
access
日志的配置
deploy/jbossweb-tom
cat
55.sar/server.xml
http://tom
cat
.apache.org/tom
cat
-5.5-doc/config/valve.html pattern配置: %a - Remote IP address %A - Local IP address %b - Bytes sent, excluding HTTP headers, or '-' if zero %B - Bytes sent, excluding HTTP headers %h - Remote host name (or IP address if resolveHosts is false) %H - Request protocol %l - Remote
log
ical
username
from identd (always returns '-') %m - Request method (GET, POST, etc.) %p - Local port on which this request was receiv
ed
%q - Query string (prepend
ed
with a '?' if it exists) %r - First line of the request (method and request URI) %s - HTTP status code of the response %S - User session ID %t - Date and
ti
me, in Common
Log
Format %u - Remote user that was
au
then
ti
cat
ed
(if any), else '-' %U - Request
ed
URL path %v - Local server name %D -
Ti
me taken to process the request, in millis %T -
Ti
me taken to process the request, in seconds %I - current request thread name (can compare later with stacktraces) There is also support to write informa
ti
on from the cookie, incoming header, outgoing response headers, the Session or something else in the ServletRequest. It is model
ed
after the apache syntax: %{xxx}i for incoming request headers %{xxx}o for outgoing response headers %{xxx}c for a specific request cookie %{xxx}r xxx is an attribute in the ServletRequest %{xxx}s xxx is an attribute in the HttpSession The shorthand pattern name common (which is also the def
au
lt) corresponds to '%h %l %u %t "%r" %s %b'.
access
log
在springboot
中
开启,表达式介绍,配置详情,使用undertow容器时%D接口耗时不打印问题解决。
access
log
在springboot
中
开启,表达式介绍,配置详情,使用undertow容器时%D接口耗时不打印问题解决。简介:配置文件配置(springboot项目使用的容器默认是tom
cat
那就选2,如果是undertow就选1):配置文件配置日志输出表达式介绍:(server.tom
cat
.
access
log
.pattern 解释:) 简介: 1.为了接入接口访问监控,可以直接使用容器(undertow,tom
cat
)自带的配置实现打印
access
log
...
SpringBoot内嵌Tom
cat
Access
log
配置
tom
cat
的
access
log
日志 D:/
log
s server.tom
cat
.
access
log
.buffer
ed
=true server.tom
cat
.
access
log
.enabl
ed
=true server.tom
cat
.
access
log
.file-date-format=.yyyy-MM-dd server.tom
cat
.
access
log
.pattern=%a %h %m %l %u %t %r %s %S %b %D %T %I server.tom
cat
.
access
log
.prefi
springboot
中
配置tom
cat
的
access
log
在tom
cat
的
access
中
打印出请求的情况可以帮助我们分析问题,通常比较关注的有访问IP、线程号、访问url、返回状态码、访问时间、持续时间。 在Spring boot
中
使用了内嵌的tom
cat
,可以通过server.tom
cat
.
access
log
配置tom
cat
的
access
日志,这里就以Spring boot 1.5.3为例。 server.tom
cat
.
access
log
....
Tom
cat
access
log
配置
在tom
cat
的
access
中
打印出请求的情况可以帮助我们分析问题,通常比较关注的有访问IP、线程号、访问url、返回状态码、访问时间、持续时间。 在Spring boot
中
使用了内嵌的tom
cat
,可以通过server.tom
cat
.
access
log
配置tom
cat
的
access
日志,这里就以Spring boot 1.5.3为例。 server.tom
cat
.
access
log
.buffe...
Web 开发
81,091
社区成员
341,718
社区内容
发帖
与我相关
我的任务
Web 开发
Java Web 开发
复制链接
扫一扫
分享
社区描述
Java Web 开发
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章