JBoss中有两个文件与日志配置相关,以单机模式为例,在目录$JBOSS_HOME1/standalone/configuration/
下,standalone.xml
为服务器配置文件,其日志子系统可管理日志输出,而logging.properties
为默认的日志管理器,在日志子系统加载前一直有效;standalone.xml的配置优先级高于
logging.properties`。
1、访问日志
访问日志记录客户端的所有请求及应答的简略信息,格式为:IP - - [日期] “请求方式 请求的资源路径 传输协议及其版本” 应答状态码 -。
我们从standalone.xml
中找到xmlns
为urn:jboss:domain:web:1.1
的subsystem
节点:
<subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" native="false">
<connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>
<virtual-server name="default-host" enable-welcome-root="true">
<alias name="localhost"/>
<alias name="example.com"/>
</virtual-server>
</subsystem>
在该节点下的虚拟主机(如default-host
)中,