Discussions

Web tier: servlets, JSP, Web frameworks: JBoss/Tomcat, Struts log separation

  1. JBoss/Tomcat, Struts log separation (4 messages)

    Hello,

    I am currently involved in the development of a Web interface for an exisisting application running on JBoss. $JBOSS_HOME/server/default/log/server.log is currently used for behaviour inspection of the application.

    The introduction of the Struts application has generated a lot of unwanted log-lines in the server.log file. I have managed to log org.apache.struts events to a separate log-file with some extra configuration in $JBOSS_HOME/server/default/conf/log4j.xml.

    <category name="org.apache.struts">
      <priority value="DEBUG"/>
      <appender-ref ref="CONSOLE"/>
      <appender-ref ref="STRUTS"/>
    </category>

    (Where the STRUTS appender is a copy of the FILE appender with a new file-name)

    But the problem is still there, fine I get all the lines I want in a separate file but I want them completely removed from the server.log file, is this possible? Or does all logging go to server.log no matter what?

    /Andreas, andreas.toom@comitnet.com

    Threaded Messages (4)

  2. JBoss/Tomcat, Struts log separation[ Go to top ]

    Change the priority to INFO. This generates minimal log output.

    Cheers and happy coding,
    Martin
  3. JBoss/Tomcat, Struts log separation[ Go to top ]

    Change the priority to INFO. This generates minimal log output.Cheers and happy coding,Martin

    Changing the priority removes a lot of lines yes, BUT what if I want to see DEBUG output in my struts.log file and not in the server.log file?

    What is the purpose of the server.log file for JBoss, does all logging go to this file automatically? is there a way to control the content of the server.log file?

    /Andreas, andreas.toom@comitnet.com
  4. JBoss/Tomcat, Struts log separation[ Go to top ]

    BUT what if I want to see DEBUG output in my struts.log file and not in the server.log file?

    In that case, you must configure a different appender.
  5. JBoss/Tomcat, Struts log separation[ Go to top ]

    In that case, you must configure a different appender.
    Now I know why everything goes to the server.log file, it's because the FILE appender is in the root-category. Remoing the FILE appender from the root-category creates another dilemma though, if this is the only way to go I have to manually add all jboss logging by hand, feels like it is easy to miss some important lines. Got any ideas?

    /Andreas