confluence启⽤⽤户访问⽇志⽅法⼀:
在confluence/l删除注释,并修改log4j与log4j2
<filter-mapping>
<filter-name>AccessLogFilter</filter-name>
<url-pattern>/display/*</url-pattern>
</filter-mapping>
为
<filter-mapping>
<filter-name>AccessLogFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
在confluence/WEB-INF/classes/log4j.properties中添加配置
log4j.appender.accesslog=org.apache.log4j.RollingFileAppender
log4j.appender.accesslog.Threshold=DEBUG
log4j.appender.accesslog.File=${catalina.home}/logs/atlassian-confluence-access.log
log4j.appender.accesslog.MaxFileSize=20480KB
log4j.appender.accesslog.MaxBackupIndex=5
log4j.appender.accesslog.layout=fluence.util.PatternLayoutWithStackTrace
log4j.appender.accesslog.layout.ConversionPattern=%d %p [%t] [%c{4}] %M %m%n
取消注释并添加
log4j.fluence.util.AccessLogFilter=INFO, accesslog
log4j.fluence.util.AccessLogFilter=false
重启confluence
⽅法⼆:
修改<install-directory>/l
添加
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" maxDays="30"
pattern="%t %{X-AUSERNAME}o %{X-Forwarded-For}i %I %h %r %s %Dms %b %{Referer}i %{User-Agent}i" prefix="conf_access_log" requestAttributesEnabled="true" rotatable="true" suffix=".log"/>
重启confluence
⽅法三:
打开confluence/logs/atlassian-confluence-security.log 失败⽤户IP访问记录
将⽇志与性能分析→fluence.security.login.DefaultLoginManager→把info调为debug
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论