<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    <br>
    My understanding from the documentation was that prudent was only
    relevant when multiple JVM's were writing to the same log.  I have
    only one.  I also read that it's use (although sometimes a
    necessity) incurs a 3X drop in speed.<br>
    <br>
    On 11/03/2011 01:29 PM, ceki wrote:
    <blockquote cite="mid:4EB2F9B7.8070200@qos.ch" type="cite">
      <br>
      Sorry, I skipped the class loader part of the problem. In any
      case, you should really enable prudent mode if you don't want to
      have garbage in the shared log file.
      <br>
      <br>
      On 03/11/2011 9:16 PM, Scott Dudley wrote:
      <br>
      <blockquote type="cite">
        <br>
        Ceki,
        <br>
        <br>
        It looks like this will only work if each application loads it's
        own
        <br>
        copy of the logback classes. If so, this is not the case. Like I
        said in
        <br>
        my original post, we have to place them at the highest level
        classloader
        <br>
        (Tomcat's lib) so there's only one.
        <br>
        <br>
        <br>
        On 11/03/2011 11:58 AM, ceki wrote:
        <br>
        <blockquote type="cite">On 03/11/2011 7:39 PM, Scott Dudley
          wrote:
          <br>
          <blockquote type="cite">
            <br>
            There are two applications running under one Tomcat instance
            and yes,
            <br>
            Tomcat also logs via the same file and configuration.
            <br>
            <br>
            Yes, I read the link in the error but there was nothing
            applicable to my
            <br>
            specific configuration/scenario.
            <br>
            <br>
            Like I said, it does exactly what we want on Linux but log
            rotation
            <br>
            fails on Windows. If I disable JNDI, log rotation works but
            then I lose
            <br>
            context identification (application name) which is likewise
            critical.
            <br>
          </blockquote>
          <br>
          Linux is less picky about renaming files with open handles.
          However,
          <br>
          this does not mean that your log files are not being clobbered
          under
          <br>
          Linux. You should probably enable prudent mode [1].
          <br>
          <br>
          It seems that you are ignoring my remarks about setting the
          context
          <br>
          name within the config file. It's OK as ContextJNDISelector
          provides
          <br>
          an alternative solution although ContextJNDISelector is an
          overkill if
          <br>
          you are going to share the same configuration file.
          <br>
          <br>
          [1] <a class="moz-txt-link-freetext" href="http://logback.qos.ch/manual/appenders.html#prudent">http://logback.qos.ch/manual/appenders.html#prudent</a>
          <br>
          <br>
          <blockquote type="cite">
            <br>
            On 11/03/2011 11:06 AM, ceki wrote:
            <br>
            <blockquote type="cite">Hi Scott,
              <br>
              <br>
              I presume you have already read the link provided in the
              error:
              <br>
              <br>
              <a class="moz-txt-link-freetext" href="http://logback.qos.ch/codes.html#renamingError">http://logback.qos.ch/codes.html#renamingError</a>
              <br>
              <br>
              Which applications write to
              apache-tomcat-6.0.24\logs\debug.log? Does
              <br>
              Tomcat write there too?
              <br>
              <br>
              Did you know that you can specify the context name in the
              logback
              <br>
              configuration file? You can also have a configuraion file
              per
              <br>
              application which than share a configuration file via
              inclusion.
              <br>
              <br>
              Here is an example:
              <br>
              <br>
              For application A:
              <br>
              <br>
              <configuration>
              <br>
              <statusListener
              <br>
              class="ch.qos.logback.core.status.OnConsoleStatusListener"
              />
              <br>
              <contextName>appA</contextName>
              <br>
              <include file="c:/foo/shared-logback.xml"/>
              <br>
              </configuration>
              <br>
              <br>
              For application B:
              <br>
              <br>
              <configuration>
              <br>
              <statusListener
              <br>
              class="ch.qos.logback.core.status.OnConsoleStatusListener"
              />
              <br>
              <contextName>appB</contextName>
              <br>
              <include file="c:/foo/shared-logback.xml"/>
              <br>
              </configuration>
              <br>
              <br>
              shared-logback.xml
              <br>
              <br>
              <included>
              <br>
              <appender name="FILE"
              <br>
class="ch.qos.logback.core.rolling.RollingFileAppender">
              <br>
              <file>${catalina.home}/logs/debug.log</file>
              <br>
              <br>
              <rollingPolicy ....
              <br>
              </appender>
              <br>
              <br>
              <root level="DEBUG">
              <br>
              <appender-ref ref="FILE" />
              <br>
              </root>
              <br>
              </included>
              <br>
              <br>
              HTH,
              <br>
            </blockquote>
            <br>
          </blockquote>
        </blockquote>
        <br>
      </blockquote>
      <br>
      <br>
    </blockquote>
    <br>
    <div class="moz-signature">-- <br>
      <span style="font-family: Verdana,Geneva,sans-serif; font-size:
        18px; color: rgb(0, 51, 102);">Scott Dudley</span><br>
      <span style="font-size: 12px; font-family:
        Verdana,Geneva,sans-serif; color: rgb(102, 102, 102);">Senior
        Developer </span>
      <p style="font-size: 12px; font-family: Verdana,Geneva,sans-serif;
        color: rgb(102, 102, 102);">Telesoft Corp. | 1661 E. Camelback
        Rd., Suite 300 | Phoenix, AZ, 85016</p>
      <p style="font-size: 12px; font-family:
        Verdana,Geneva,sans-serif;"><strong><span style="color: rgb(255,
            153, 0);">o:</span></strong> <span style="font-size: 12px;
          font-family: Verdana,Geneva,sans-serif; color: rgb(102, 102,
          102);">(602) 308-1115</span><strong><span style="color:
            rgb(255, 153, 0);"> </span></strong><span style="color:
          rgb(255, 153, 0);"><font color="#999999">|</font> </span><strong><span
            style="color: rgb(255, 153, 0);">f:</span></strong> <span
          style="font-size: 12px; font-family:
          Verdana,Geneva,sans-serif; color: rgb(102, 102, 102);">(602)
          308-1300</span> <font color="#8c8c8c">| </font><strong><span
            style="color: rgb(255, 153, 0);">w:</span></strong> <span
          style="font-size: 12px; font-family:
          Verdana,Geneva,sans-serif; color: rgb(102, 102, 102);"><a
            href="http://www.telesoft.com">www.telesoft.com</a></span> <font
          color="#8c8c8c">
        </font></p>
      <p><span style="font-family: Verdana,Geneva,sans-serif; font-size:
          12px;"><font color="#8c8c8c"><strong style="font-weight: bold;
              padding: 0px; margin: 0px;"><span style="color: rgb(255,
                153, 0); padding: 0px; margin: 0px;"><a
                  href="http://www.telesoft.com/blog">TEM Edge Blog</a>
              </span></strong><span style="color: rgb(255, 153, 0);
              padding: 0px; margin: 0px;"><span style="color: rgb(153,
                153, 153);">|</span></span><strong style="font-weight:
              bold; padding: 0px; margin: 0px;"><span style="color:
                rgb(255, 153, 0); padding: 0px; margin: 0px;"> <a
                  href="http://www.twitter.com/_Telesoft">Twitter</a> </span></strong><span
              style="color: rgb(255, 153, 0); padding: 0px; margin:
              0px;"><span style="color: rgb(153, 153, 153);">|</span></span><strong
              style="font-weight: bold; padding: 0px; margin: 0px;"><span
                style="color: rgb(255, 153, 0); padding: 0px; margin:
                0px;"> <a
                  href="http://www.facebook.com/pages/Telesoft-Corp/76397971661">Facebook<br>
                  <br>
                </a><a title="Telesoft Conference 2011"
                  href="http://www.telesoftconference.com"
                  target="_blank">Join us at Telesoft Connections 2011.
                  Learn more now!</a></span></strong></font></span></p>
    </div>
  </body>
</html>