반응형

JBoss EAP 7 - access log 설정

 

#standalone 모드

로그 경로를 변경할 경우 사용 - env.sh

지정하지 않을 경우 default 경로 사용 - ${jboss.server.base.dir}/log

export JAVA_OPTS="$JAVA_OPTS -Djboss.server.log.dir=/logs/server-group/server11"

access log 설정 - standalone.xml
<subsystem xmlns="urn:jboss:domain:undertow:3.1" instance-id="${jboss.server.name}">
 <buffer-cache name="default"/>
 <server name="default-server">
  <ajp-listener name="ajp" socket-binding="ajp"/>
  <http-listener name="default" socket-binding="http" redirect-socket="https"/>
  <host name="default-host" alias="localhost">
   <location name="/" handler="welcome-content"/>

   <!-- combined -->
   <access-log prefix="access." directory="${jboss.server.log.dir}/access" pattern="%h %l %u %t %r %s %b %{i,Referer} %{i,User-Agent} %s %T"/>
   <filter-ref name="server-header"/>
   <filter-ref name="x-powered-by-header"/>
  </host>
 </server>
...
</subsystem>

 

 

#domain 모드

로그 경로를 변경할 경우 사용 - host-slave.xml

<server name="server11" group="server-group">
<paths>
 <path name="custom.server.log.dir" path="/logs/server-group/server11"/>
</paths>

 

access log 설정 - domain.xml

<subsystem xmlns="urn:jboss:domain:undertow:3.1" instance-id="${jboss.server.name}">
 <buffer-cache name="default"/>
 <server name="default-server">
  <ajp-listener name="ajp" socket-binding="ajp"/>
  <http-listener name="default" socket-binding="http" redirect-socket="https"/>
  <host name="default-host" alias="localhost">
   <location name="/" handler="welcome-content"/>
   <filter-ref name="server-header"/>
   <filter-ref name="x-powered-by-header"/>

   <!-- combined -->

   <!-- use change log dir -->
   <access-log prefix="access." relative-to="custom.server.log.dir" directory="access" pattern="%h %l %u %t %r %s %b %{i,Referer} %{i,User-Agent} %s %T"/>

   <!-- use default log dir -->

   <access-log prefix="access." relative-to="jboss.server.log.dir" directory="access" pattern="%h %l %u %t %r %s %b %{i,Referer} %{i,User-Agent} %s %T"/>
  </host>
 </server>
...
</subsystem>

반응형

' > WAS' 카테고리의 다른 글

1. JBoss 개요  (0) 2022.06.30
JBoss EAP 6 - access log 설정  (0) 2022.06.30
JBoss EAP6 system proeprty DEFAULT_CONNECTION_TIMEOUT  (0) 2022.06.30
JBoss EAP 6 쓰레드 설정  (0) 2022.06.30
JBoss EAP 7 쓰레드 설정  (0) 2022.06.30

+ Recent posts