Monday, November 30, 2015

WildFly 8 access log configuration

WildFly 8 configuration
WildFly open method and JBoss access_log 7 are similar, but also to find the web container corresponding to add configuration can be, but the container two use is not the same, but WildFly must be specified directory log.

 <subsystem xmlns="urn:jboss:domain:undertow:1.0">
                <buffer-cache name="default" buffer-size="1024" buffers-per-region="1024" max-regions="10"/>
            <server name="default-server">
                <http-listener name="default" socket-binding="http"/>
                <host name="default-host" alias="localhost">
                    <location name="/" handler="welcome-content"/>
                    <filter-ref name="server-header"/>
                    <filter-ref name="x-powered-by-header"/>
                    <access-log pattern="common" directory="${jboss.home.dir}/standalone/log" prefix="access" />
            <servlet-container name="default" default-buffer-cache="default" stack-trace-on-error="local-only">
                <file name="welcome-content" path="${jboss.home.dir}/welcome-content" directory-listing="true"/>
                <response-header name="server-header" header-name="Server" header-value="Wildfly 8"/>
                <response-header name="x-powered-by-header" header-name="X-Powered-By" header-value="Undertow 1"/>
As above, add the red line, you can open the WildFly 8 access_log function, restart the server, access to ip:8080 can be generated access.log in the JBOSS_HOME/standalone/log directory.
Among them
Prefix specifies the prefix log file name or file name
Pattern specifies the format of the log
Pattern can be set to two ways, the first is "common pattern=", the second is pattern="combined"

As can be seen, the second format of the log output relative to the concrete, and the actual development of opening which format in the access_log process according to demand to determine it.

Opening the access_log configuration to the end, if you have any questions, please refer to the following information, or to contact us, thank you!

No comments:

Post a Comment