GlassFish3配置access访问日志

文档参考: https://blogs.oracle.com/jluehe/entry/access_log_patterns_and_nicknames

 

要启用glassfish的访问日志,需要配置domain/domainx/下的domain.xml

      <http-service access-logging-enabled="true">
        <access-log format="%datetime%|%client.name%|%referer%|%status%|%user.agent%|%http-uri%|%http-method%"></access-log>
...
      </http-service>
 

参数说明:

%datetime%  访问时间   "22/May/2012:10:31:57 +0000"

%request%                       "GET /aa/js/rpc/utf.js HTTP/1.1"

%status%                          200

%user.agent%                   "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:12.0) Gecko/20100101 Firefox/12.0"

%client.name%"               "172.16.9.21"

%referer%                        "http://172.16.10.66:8080/aa/start.do?a=b&e=c&d=987654321234&g=i"

%http-uri%                       "/aa/img/loading.gif"

%http-method%"              "GET"

 

 

你可能感兴趣的:(Glassfish,access log,访问日志)