<?xml version="1.0"?>

<server>
  <logs version="1.1">
    <!-- see http://jakarta.apache.org/avalon/excalibur/logger/index.html -->
    <factories>
      <factory type="file" class="org.apache.avalon.excalibur.logger.factory.FileTargetFactory"/>
    </factories>

    <!-- Logger categories -->
    <!-- -->
    <!-- The categories element contains zero or more category elements. -->
    <!-- -->
    <!-- Each category element has a name attribute that should be unique -->
    <!-- among the category elements. It also has a log-level attribute. -->
    <!-- This attribute can be set to any of the values FATALERROR, ERROR, -->
    <!-- WARN, INFO, or DEBUG.  This value determines what log messages -->
    <!-- are recorded in the log file.  In addition, each category element -->
    <!-- can have zero or more category subelements. -->
    <!-- -->
    <!-- Each category element has a single log-target sub-element.  Each of -->
    <!-- these elements has an id-ref attribute that must match the id attribute -->
    <!-- of a file subelement of the targets element that can be found in this -->
    <!-- file. -->
    <!-- -->
    <!-- In addition, each category element can have zero or more category subelements. -->
    <!-- -->
    <categories>
      <category name="" log-level="INFO">
        <log-target id-ref="default"/>
      </category>
      <category name="James.Mailet" log-level="INFO">
        <log-target id-ref="James-Mailet-target"/>
      </category>
      <category name="James" log-level="INFO">
        <log-target id-ref="James-target"/>
      </category>
      <category name="spoolmanager" log-level="INFO">
        <log-target id-ref="spoolmanager-target"/>
      </category>
      <category name="dnsserver" log-level="INFO">
        <log-target id-ref="dnsserver-target"/>
      </category>
      <category name="remotemanager" log-level="INFO">
        <log-target id-ref="remotemanager-target"/>
      </category>
      <category name="pop3server" log-level="INFO">
        <log-target id-ref="pop3server-target"/>
      </category>
      <category name="smtpserver" log-level="INFO">
        <log-target id-ref="smtpserver-target"/>
      </category>
      <category name="nntpserver" log-level="INFO">
        <log-target id-ref="nntpserver-target"/>
      </category>
      <category name="nntp-repository" log-level="INFO">
        <log-target id-ref="nntp-repository-target"/>
      </category>
      <category name="mailstore" log-level="INFO">
        <log-target id-ref="mailstore-target"/>
      </category>
      <category name="users-store" log-level="INFO">
        <log-target id-ref="users-store-target"/>
      </category>
      <category name="objectstorage" log-level="INFO">
        <log-target id-ref="objectstorage-target"/>
      </category>
      <category name="connections" log-level="INFO">
        <log-target id-ref="connections-target"/>
      </category>
      <category name="sockets" log-level="INFO">
        <log-target id-ref="sockets-target"/>
      </category>
      <category name="scheduler" log-level="INFO">
        <log-target id-ref="scheduler-target"/>
      </category>
      <category name="fetchpop" log-level="INFO">
        <log-target id-ref="fetchpop-target"/>
      </category>
    </categories>

    <!-- Logger targets -->
    <!-- -->
    <!-- The targets element contains zero or more file elements. -->
    <!-- -->
    <!-- Each file element has an id attribute that should be unique -->
    <!-- among the file elements.  -->
    <!-- -->
    <!-- Each file element has three sub-elements.  The filename element -->
    <!-- specifies the file associated with this log target.   The format -->
    <!-- element describes the format for each line in the log.  The append -->
    <!-- element is a boolean value that determines whether James appends -->
    <!-- to old logs on restart.  -->
    <!-- -->
    <targets>
      <file id="default">
        <filename>${app.home}/logs/default</filename>
        <format>%{time:dd/MM/yy HH:mm:ss} %5.5{priority} %{category}: %{message}\n%{throwable}</format>
        <append>true</append>
        <rotation type="unique" pattern="-yyyy-MM-dd-HH-mm" suffix=".log">
          <or>
            <date>dd</date>
            <size>10485760</size>
          </or>
        </rotation>
      </file>
      <file id="James-Mailet-target">
        <filename>${app.home}/logs/mailet</filename>
        <format>%{time:dd/MM/yy HH:mm:ss} %5.5{priority} %{category}: %{message}\n%{throwable}</format>
        <append>true</append>
        <rotation type="unique" pattern="-yyyy-MM-dd-HH-mm" suffix=".log">
          <or>
            <date>dd</date>
            <size>10485760</size>
          </or>
        </rotation>
      </file>
      <file id="James-target">
        <filename>${app.home}/logs/james</filename>
        <format>%{time:dd/MM/yy HH:mm:ss} %5.5{priority} %{category}: %{message}\n%{throwable}</format>
        <append>true</append>
        <rotation type="unique" pattern="-yyyy-MM-dd-HH-mm" suffix=".log">
          <or>
            <date>dd</date>
            <size>10485760</size>
          </or>
        </rotation>
      </file>
      <file id="spoolmanager-target">
        <filename>${app.home}/logs/spoolmanager</filename>
        <format>%{time:dd/MM/yy HH:mm:ss} %5.5{priority} %{category}: %{message}\n%{throwable}</format>
        <append>true</append>
        <rotation type="unique" pattern="-yyyy-MM-dd-HH-mm" suffix=".log">
          <or>
            <date>dd</date>
            <size>10485760</size>
          </or>
        </rotation>
      </file>
      <file id="dnsserver-target">
        <filename>${app.home}/logs/dnsserver</filename>
        <format>%{time:dd/MM/yy HH:mm:ss} %5.5{priority} %{category}: %{message}\n%{throwable}</format>
        <append>true</append>
        <rotation type="unique" pattern="-yyyy-MM-dd-HH-mm" suffix=".log">
          <or>
            <date>dd</date>
            <size>10485760</size>
          </or>
        </rotation>
      </file>
      <file id="remotemanager-target">
        <filename>${app.home}/logs/remotemanager</filename>
        <format>%{time:dd/MM/yy HH:mm:ss} %5.5{priority} %{category}: %{message}\n%{throwable}</format>
        <append>true</append>
        <rotation type="unique" pattern="-yyyy-MM-dd-HH-mm" suffix=".log">
          <or>
            <date>dd</date>
            <size>10485760</size>
          </or>
        </rotation>
      </file>
      <file id="pop3server-target">
        <filename>${app.home}/logs/pop3server</filename>
        <format>%{time:dd/MM/yy HH:mm:ss} %5.5{priority} %{category}: %{message}\n%{throwable}</format>
        <append>true</append>
        <rotation type="unique" pattern="-yyyy-MM-dd-HH-mm" suffix=".log">
          <or>
            <date>dd</date>
            <size>10485760</size>
          </or>
        </rotation>
      </file>
      <file id="smtpserver-target">
        <filename>${app.home}/logs/smtpserver</filename>
        <format>%{time:dd/MM/yy HH:mm:ss} %5.5{priority} %{category}: %{message}\n%{throwable}</format>
        <append>true</append>
        <rotation type="unique" pattern="-yyyy-MM-dd-HH-mm" suffix=".log">
          <or>
            <date>dd</date>
            <size>10485760</size>
          </or>
        </rotation>
      </file>
      <file id="nntpserver-target">
        <filename>${app.home}/logs/nntpserver</filename>
        <format>%{time:dd/MM/yy HH:mm:ss} %5.5{priority} %{category}: %{message}\n%{throwable}</format>
        <append>true</append>
        <rotation type="unique" pattern="-yyyy-MM-dd-HH-mm" suffix=".log">
          <or>
            <date>dd</date>
            <size>10485760</size>
          </or>
        </rotation>
      </file>
      <file id="nntp-repository-target">
        <filename>${app.home}/logs/nntpstore</filename>
        <format>%{time:dd/MM/yy HH:mm:ss} %5.5{priority} %{category}: %{message}\n%{throwable}</format>
        <append>true</append>
        <rotation type="unique" pattern="-yyyy-MM-dd-HH-mm" suffix=".log">
          <or>
            <date>dd</date>
            <size>10485760</size>
          </or>
        </rotation>
      </file>
      <file id="mailstore-target">
        <filename>${app.home}/logs/mailstore</filename>
        <format>%{time:dd/MM/yy HH:mm:ss} %5.5{priority} %{category}: %{message}\n%{throwable}</format>
        <append>true</append>
        <rotation type="unique" pattern="-yyyy-MM-dd-HH-mm" suffix=".log">
          <or>
            <date>dd</date>
            <size>10485760</size>
          </or>
        </rotation>
      </file>
      <file id="users-store-target">
        <filename>${app.home}/logs/usersstore</filename>
        <format>%{time:dd/MM/yy HH:mm:ss} %5.5{priority} %{category}: %{message}\n%{throwable}</format>
        <append>true</append>
        <rotation type="unique" pattern="-yyyy-MM-dd-HH-mm" suffix=".log">
          <or>
            <date>dd</date>
            <size>10485760</size>
          </or>
        </rotation>
      </file>
      <file id="objectstorage-target">
        <filename>${app.home}/logs/objectstore</filename>
        <format>%{time:dd/MM/yy HH:mm:ss} %5.5{priority} %{category}: %{message}\n%{throwable}</format>
        <append>true</append>
        <rotation type="unique" pattern="-yyyy-MM-dd-HH-mm" suffix=".log">
          <or>
            <date>dd</date>
            <size>10485760</size>
          </or>
        </rotation>
      </file>
      <file id="connections-target">
        <filename>${app.home}/logs/connections</filename>
        <format>%{time:dd/MM/yy HH:mm:ss} %5.5{priority} %{category}: %{message}\n%{throwable}</format>
        <append>true</append>
        <rotation type="unique" pattern="-yyyy-MM-dd-HH-mm" suffix=".log">
          <or>
            <date>dd</date>
            <size>10485760</size>
          </or>
        </rotation>
      </file>
      <file id="sockets-target">
        <filename>${app.home}/logs/sockets</filename>
        <format>%{time:dd/MM/yy HH:mm:ss} %5.5{priority} %{category}: %{message}\n%{throwable}</format>
        <append>true</append>
        <rotation type="unique" pattern="-yyyy-MM-dd-HH-mm" suffix=".log">
          <or>
            <date>dd</date>
            <size>10485760</size>
          </or>
        </rotation>
      </file>
      <file id="scheduler-target">
        <filename>${app.home}/logs/scheduler</filename>
        <format>%{time:dd/MM/yy HH:mm:ss} %5.5{priority} %{category}: %{message}\n%{throwable}</format>
        <append>true</append>
        <rotation type="unique" pattern="-yyyy-MM-dd-HH-mm" suffix=".log">
          <or>
            <date>dd</date>
            <size>10485760</size>
          </or>
        </rotation>
      </file>
      <file id="fetchpop-target">
        <filename>${app.home}/logs/fetchpop</filename>
        <format>%{time:dd/MM/yy HH:mm:ss} %5.5{priority} %{category}: %{message}\n%{throwable}</format>
        <append>true</append>
        <rotation type="unique" pattern="-yyyy-MM-dd-HH-mm" suffix=".log">
          <or>
            <date>dd</date>
            <size>10485760</size>
          </or>
        </rotation>
      </file>
    </targets>
  </logs>
</server>
