You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by "alan.gerhard" <al...@gercom.com> on 2003/02/09 15:40:35 UTC

Set default log rotation (optional format)

>   noel        2003/02/08 22:55:52
>   Modified: src/conf Tag: branch_2_1_fcs james-server.xml
>   Log:
>   Set default rotation to daily OR 10MB

To get the logfiles to begin with the date, ie
20030214James.Log, try setting up the environment as follows
-
 
      <file id="James-target">
        <filename>d:/Transfer/James/logs/20</filename>
        <format>%{time:dd/MM/yy HH:mm:ss} %5.5{priority}
%{category}: %{message}\n%{throwable}</format>
        <append>true</append>
        <rotation type="unique" pattern="yyMMdd"
suffix="james.log">
          <or>
            <date>dd</date>
            <size>10485760</size>
          </or>
        </rotation>
      </file>



_______________________
thanks,
alan

---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org


RE: Set default log rotation (optional format)

Posted by "Noel J. Bergman" <no...@devtech.com>.
Alan,

Would you like to add that example to the log rotation Wiki page?  :-)  As
for the default, the example isn't the convention I've seen used by most
admins for logs.  They typically start with the name, then the date, then
the suffix.

Users can configure the logs however they want.  I wasn't even going to add
the <size> part, but I thought that it would be easier to show how to do it,
and someone can take it out, than to leave it out, and people would have to
put it in.  The informal poll of users didn't seem to indicate a preference
one way or another.

	--- Noel

-----Original Message-----
From: alan.gerhard@gercom.com [mailto:alan.gerhard@gercom.com]
Sent: Sunday, February 09, 2003 9:41
To: James Users List
Subject: Set default log rotation (optional format)


>   noel        2003/02/08 22:55:52
>   Modified: src/conf Tag: branch_2_1_fcs james-server.xml
>   Log:
>   Set default rotation to daily OR 10MB

To get the logfiles to begin with the date, ie
20030214James.Log, try setting up the environment as follows
-

      <file id="James-target">
        <filename>d:/Transfer/James/logs/20</filename>
        <format>%{time:dd/MM/yy HH:mm:ss} %5.5{priority}
%{category}: %{message}\n%{throwable}</format>
        <append>true</append>
        <rotation type="unique" pattern="yyMMdd"
suffix="james.log">
          <or>
            <date>dd</date>
            <size>10485760</size>
          </or>
        </rotation>
      </file>



_______________________
thanks,
alan


---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org