Preface for a website, access log, that is, access_log, is a very important function for the website. With this feature, we can collect a lot of useful information to facilitate website O & M. Therefore, this feature is basically enabled for every website. In JBossAs7 configuration by default, JBoss7.1 does not enable access_l
Preface for a website, access log, that is, access_log, is a very important function for the website. With this feature, we can collect a lot of useful information to facilitate website O & M. Therefore, this feature is basically enabled for every website. In JBoss As 7 configuration by default, JBoss7.1 does not enable access_l
Preface
Access logs (access_log) are an important function for a website. With this feature, we can collect a lot of useful information to facilitate website O & M.EnableThis feature.
JBoss As 7 Configuration
By default, JBoss7.1 does notEnableAccess_log, if you wantEnableFor this function, you need to modify the $ JBOSS_HOME \ standalone \ configuration \ standalone. xml (domain. xml) file. The related modifications are as follows:
After completing the preceding configuration and restarting the server, you can access your website, then you will see a file named access_log.2012-02-24 in the $ JBOSS_HOME \ standalone \ log \ default-host directory, which is the access log you need.
WildFly 8 Configuration
WildFlyEnableThe access_log method is similar to JBoss 7. It is also possible to find the corresponding web Container and add the configuration, but the containers used by the two are different, and the log storage directory must be specified in WildFly.
As shown above, add a red line.EnableAccess_log function of WildFly 8, restart the server, and access ip: 8080 to generate access. log in the JBOSS_HOME/standalone/log directory..
Where
Prefix specifies the prefix name of the log file, that is, the file name.
Pattern specifies the log format
Pattern can be set in two ways. The first is pattern = "common", and the second is pattern = "combined"
The following is the log output in two formats tested by the author. Access localhost: 8080
Log output in common format is as follows:
The output of logs in combined format is as follows:
It can be seen that the log output in the second format is relatively specific, while the actual development processEnableYou can determine the format of access_log based on your needs.
Conclusion
EnableThe configuration of access_log ends here. If you have any questions, please refer to the following materials. Thank you!
References
Https://issues.jboss.org/browse/WFLY-1721
Http://hi.baidu.com/saiv000/item/9ed9779aa1b1a2dc1f4271ea
Http://hooray520.iteye.com/blog/1335156