Tomcat4.1自动生成日志文件系统配置方法
2008-05-24 04:12
1436 查看
google_ad_client = "pub-8800625213955058";
/* 336x280, 创建于 07-11-21 */
google_ad_slot = "0989131976";
google_ad_width = 336;
google_ad_height = 280;
//
Tomcat4.1自动生成日志文件系统配置方法
编辑Tomcat/conf/server.xml文件,找到如下行:
<Context path="/examples" docBase="examples" debug="0"
reloadable="true" crossContext="true">
说明:examples就是WEBAPP名字,找到对应的名字,
增加下面的行:
<Valve className="org.apache.catalina.valves.AccessLogValve"
directory="logs" prefix="bbs_access_log." suffix=".log"
pattern="%a-%h-%b-%B-%H-%m-%q-%r-%s-%t-%U-%v" resolveHosts="false"/>
语法说明:
directory="logs" ----存放日志的目录,请不要修改
prefix="bbs_access_log." ----日志文件名
suffix=".log" ---日志文件扩展名
pattern="%a...." ---日志字段参数
resolveHosts="false" ---
参数说明:
%a - Remote IP address(远程IP地址)
%A - Local IP address (本地IP地址)
%b - Bytes sent, excluding HTTP headers, or ′-′ if zero(字节流出,排除HTTP头,如果是零字节,用′-′隔开)
%B - Bytes sent, excluding HTTP headers(字节流出,排除HTTP头)
%h - Remote host name (or IP address if resolveHosts is false)(远程主机名)
%H - Request protocol(远程请求主机端口)
%l - Remote logical username from identd (always returns ′-′) (远程用户名识别)
%m - Request method (GET, POST, etc.) (请求方式)
%p - Local port on which this request was received
%q - Query string (prepended with a ′?′ if it exists)
%r - First line of the request (method and request URI)(首行提交)
%s - HTTP status code of the response (返回HTTP状态代码)
%S - User session ID (获取用户会话ID)
%t - Date and time, in Common Log Format (记录提交时间)
%u - Remote user that was authenticated (if any), else ′-′ (识别远程用户在什么地方)
%U - Requested URL path (被请求的URL路径)
%v - Local server name (本地服务器名)
/* 336x280, 创建于 07-11-21 */
google_ad_slot = "0989131976";
google_ad_width = 336;
google_ad_height = 280;
//
Tomcat4.1自动生成日志文件系统配置方法
编辑Tomcat/conf/server.xml文件,找到如下行:
<Context path="/examples" docBase="examples" debug="0"
reloadable="true" crossContext="true">
说明:examples就是WEBAPP名字,找到对应的名字,
增加下面的行:
<Valve className="org.apache.catalina.valves.AccessLogValve"
directory="logs" prefix="bbs_access_log." suffix=".log"
pattern="%a-%h-%b-%B-%H-%m-%q-%r-%s-%t-%U-%v" resolveHosts="false"/>
语法说明:
directory="logs" ----存放日志的目录,请不要修改
prefix="bbs_access_log." ----日志文件名
suffix=".log" ---日志文件扩展名
pattern="%a...." ---日志字段参数
resolveHosts="false" ---
参数说明:
%a - Remote IP address(远程IP地址)
%A - Local IP address (本地IP地址)
%b - Bytes sent, excluding HTTP headers, or ′-′ if zero(字节流出,排除HTTP头,如果是零字节,用′-′隔开)
%B - Bytes sent, excluding HTTP headers(字节流出,排除HTTP头)
%h - Remote host name (or IP address if resolveHosts is false)(远程主机名)
%H - Request protocol(远程请求主机端口)
%l - Remote logical username from identd (always returns ′-′) (远程用户名识别)
%m - Request method (GET, POST, etc.) (请求方式)
%p - Local port on which this request was received
%q - Query string (prepended with a ′?′ if it exists)
%r - First line of the request (method and request URI)(首行提交)
%s - HTTP status code of the response (返回HTTP状态代码)
%S - User session ID (获取用户会话ID)
%t - Date and time, in Common Log Format (记录提交时间)
%u - Remote user that was authenticated (if any), else ′-′ (识别远程用户在什么地方)
%U - Requested URL path (被请求的URL路径)
%v - Local server name (本地服务器名)
相关文章推荐
- RDIFramework.NET — 基于.NET的快速信息化系统开发框架- 5.4平台日志、异常管理、生成自动升级配置文件模块
- RDIFramework.NET — 基于.NET的快速信息化系统开发框架- 5.4平台日志、异常管理、生成自动升级配置文件模块
- 配置log4j的日志文件为Tomcat的logs目录的方法
- eclipse修改java代码或者其他一些资源例如配置文件,freemarker文件时tomcat不自动重启的方法
- 【网页访问单向、双向验证均可以】https原理及tomcat配置https方法[生成CA根证书配置tomcat后,若要成功访问axis中的webservice,需要配置它对应的axis2.xml文件]
- 如何配置log4j每天产生日志,并且当天日志大于10M时自动生成另一个文件
- 成功配置tomcat的log4j日志系统,格式:HTML+每天以yyyy-mm-dd.log命名的日志文件
- log4j自动生成日志文件配置
- Windows下wamp php单元测试工具PHPUnit安装及生成日志文件配置方法
- hadoop自动清除日志文件的配置方法
- 成功配置tomcat的log4j日志系统,格式:HTML+每天以yyyy-mm-dd.log命名的日志文件
- tomcat 6.x + log4j日志配置并按天(或大小)生成文件
- DEMON进程+inotify自动生成系统级文件操作日志demo
- phpunit 生成三种日志文件的配置方法
- Mybatis 如何自动生成bean dao xml 配置文件 generatorconfig.xml (main()方法自动生成更快捷)
- Tomcat-常用配置文件及关闭或调整catalina.out日志输出的三种方法
- 成功配置TOMCAT的LOG4J日志系统,格式:HTML+每天以YYYY-MM-DD.LOG命名的日志文件
- log4j无日志生成? 我将一个web项目部署在tomcat server.xml配置文件中,当我启动tomcat是无日志输出。
- 使用Eclipse3.2(MyEclipse)+ abator自动生成iBatis代码以及配置文件的方法
- linux服务器应用系统配置文件及系统重要配置文件自动备份方法