用servlet的log方法。
HttpServlet.getServletContext().log

解决方案 »

  1.   

    用tomcat的product模式就可以了阿?!?!?!?!我有个问题是怎么让tomcat的日志一天一个.而不是一直都是一个.这个怎么配置???
      

  2.   

    看Tomcat的 doc:
    http://jakarta.apache.org/tomcat/tomcat-5.5-doc/logging.html
      

  3.   


    http://jakarta.apache.org/tomcat/faq/logging.html#catalina.outWhere does System.out go? 
    How do I rotate catalina.out? 
    System.out and System.err both print to catalina.out. But you can suppress this via the swallowOutput property and sent to different log files. 
    catalina.out does not rotate. But it should not be an issue because nothing should be printing to standard output since you are using a logging package, right? a thread about rotation of catalina.out 
      

  4.   


    http://jakarta.apache.org/tomcat/faq/logging.html#catalina.outWhere does System.out go? 
    How do I rotate catalina.out? 
    System.out and System.err both print to catalina.out. But you can suppress this via the swallowOutput property and sent to different log files. 
    catalina.out does not rotate. But it should not be an issue because nothing should be printing to standard output since you are using a logging package, right? a thread about rotation of catalina.out