免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 8255 | 回复: 6
打印 上一主题 下一主题

[Web] 请教tomcat日志问题! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-11-15 09:51 |只看该作者 |倒序浏览
请问各位tomcat的配置文件是jakarta-tomcat-5.5.9/conf/server.xml吗?
在哪里配置catalina.2005-11-10.log这个日志。我没找到?请求帮助!!!

论坛徽章:
1
技术图书徽章
日期:2013-12-05 23:25:45
2 [报告]
发表于 2005-11-15 09:55 |只看该作者
<Service name="Catalina">
  <Engine name="Catalina" defaultHost="localhost">

      <!-- Global logger unless overridden at lower levels -->
      <Logger className="org.apache.catalina.logger.FileLogger"
              prefix="catalina_log." suffix=".txt"
              timestamp="true"/>

论坛徽章:
1
技术图书徽章
日期:2013-12-05 23:25:45
3 [报告]
发表于 2005-11-15 09:56 |只看该作者
还有这里:
http://www.cnjsp.org/document/user/tuman/valve.html

你可以参考的。

论坛徽章:
0
4 [报告]
发表于 2005-11-15 09:59 |只看该作者
谢谢!

但是我的日志文件是:catalina.2005-11-10.log
是带有日期的.log的文件,suffix=".txt"是不是.txt的呀。和我的是一个日志吗?

论坛徽章:
0
5 [报告]
发表于 2005-11-15 12:27 |只看该作者
<!-- Global logger unless overridden at lower levels -->
      <Logger className="org.apache.catalina.logger.FileLogger"
              prefix="catalina_log." suffix=".txt"
              timestamp="true"/>

估计你的suffix 修改为log了;如果你使用的jboss的话,看看log4j.xml文件

论坛徽章:
0
6 [报告]
发表于 2005-11-15 12:35 |只看该作者
<Server port="8005" shutdown="SHUTDOWN">

  <!-- Comment these entries out to disable JMX MBeans support used for the
       administration web application -->
  <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
  <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
  <Listener className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener"/>

  <!-- Global JNDI resources -->
  <GlobalNamingResources>

    <!-- Test entry for demonstration purposes -->
    <Environment name="simpleValue" type="java.lang.Integer" value="30"/>

    <!-- Editable user database that can also be used by
         UserDatabaseRealm to authenticate users -->
    <Resource name="UserDatabase" auth="Container"
              type="org.apache.catalina.UserDatabase"
       description="User database that can be updated and saved"
           factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
          pathname="conf/tomcat-users.xml" />

  </GlobalNamingResources>


  <Service name="Catalina">

    <!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
    <Connector port="80" maxHttpHeaderSize="8192"
               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
               enableLookups="false" redirectPort="8443" acceptCount="100"
               connectionTimeout="20000" disableUploadTimeout="true" />
    <!-- Note : To disable connection timeouts, set connectionTimeout value
     to 0 -->
    <!-- Define an AJP 1.3 Connector on port 8009 -->
    <Connector port="8009"
               enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />
         
    <!-- Define the top level container in our container hierarchy -->
    <Engine name="Catalina" defaultHost="localhost">

      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
             resourceName="UserDatabase"/>

      <Host name="localhost" appBase="webapps"
       unpackWARs="true" autoDeploy="true"
       xmlValidation="false" xmlNamespaceAware="false">

                                <Context path="/" docBase="/usr/local/jakarta-tomcat-5.5.9/webapps/test" debug="1" reloadable="true">
                                  <Resource name="jndi-test" auth="Container"
                                    type="javax.sql.DataSource"
                                    driverClassName="oracle.jdbc.driver.OracleDriver"
                                    url="jdbcracle:thin192.170.0.5:1521:database" username="username"
                                    password="password" maxActive="100" maxIdle="10" maxWait="600" />
                                </Context>

        
        <Valve className="org.apache.catalina.valves.FastCommonAccessLogValve" directory="logs" prefix="localhost_access_log." suffix=".txt"
        pattern="combined" resolveHosts="false" fileDateFormat="yyyy-MM-dd.HH"/>
      </Host>

    </Engine>

  </Service>

</Server>

论坛徽章:
0
7 [报告]
发表于 2005-11-15 12:38 |只看该作者
上面是tomcat/conf/server.xml里面的配置,我把注视去掉了。它可以每天生成catalina.日期.log的日志文件。请帮忙分析一下?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP