RE: Log File Rotation

2003-01-26 Thread Noel J. Bergman
> Reasonable default, docs and user feedback is the way to go.

See: http://nagoya.apache.org/wiki/apachewiki.cgi?James/LogRotation

--- Noel

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Log File Rotation

2003-01-26 Thread Harmeet Bedi
- Original Message -
From: "Noel J. Bergman" <[EMAIL PROTECTED]>
> Each log file is independently configurable.  But I'm not terribly
inclined
> to guess what custom configuration everyone will want in their logs.  We
> have to pick a default pattern and policy set, and stick with it.  If our
> users indicate some sort of broad agreement on how they typically want
logs
> rotated, we can make that the default.
>
> I am willing to put this information into the Wiki, and into an FAQ,

Date based rotation is a good improvement  esp. when coupled with
documentation changes so +1 on that.

I would have picked size based rotation as the default as it is safer, but
you are right administrators will want to customize logging to suit
their deployment requirements and it will never be possible to satisfy all.
Reasonable default, docs and user feedback is the way to go.

Harmeet




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Log File Rotation

2003-01-26 Thread Noel J. Bergman
Harmeet,

> There may be log files that rarely change. No need to rotate them daily.

Each log file is independently configurable.  But I'm not terribly inclined
to guess what custom configuration everyone will want in their logs.  We
have to pick a default pattern and policy set, and stick with it.  If our
users indicate some sort of broad agreement on how they typically want logs
rotated, we can make that the default.

> The log file size could grow without upper bound even within a day.

Anyone who wants to can reconfigure the log rotation.  Most administrators
rotate logs, if they rotate them, on a periodic basis.  The way Avalon
rotates using a date, logs can rotate hourly, daily, monthly, or yearly.
They could rotate at specific points during the day with a  element,
or when a size is reached with a  element.

For example, the current:

  

  dd

  

rotates that log daily.  Adding

  1048576

would rotate at a 1MB boundary, within the day.

However, because of the way Avalon's UniqueFileStrategy class constructs the
filename, simply adding another rotation policy won't work properly if
rotation can occur more often than daily. The pattern attribute is only set
for daily rotation.  We'd need to change the pattern to be something like
"--MM-dd-hh" to allow rotation (for whatever reason) hourly, or
"--MM-dd-hh-mm" if the log could rotate more than once within an hour.
So instead of having a file name like:

   smtpserver-2003-01-26.log

we'd have to have:

   smtpserver-2003-01-26-18.log or smtpserver-2003-01-26-18-30.log

if we expect to rotate more than daily.

I am willing to put this information into the Wiki, and into an FAQ, for our
users to customize their logging, but I am not planning to write an entire
tutorial on Avalon log rotation.

--- Noel


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Log File Rotation

2003-01-26 Thread Danny Angus
+1 for comit to HEAD Noel. I'm kind of out of the picture for 2.1 at the mo, so no 
+comment.

> -Original Message-
> From: Noel J. Bergman [mailto:[EMAIL PROTECTED]]
> Sent: 26 January 2003 21:09
> To: James Developers List
> Subject: RE: Log File Rotation
> 
> 
> Attached is a version of james-server.xml to configure James for daily
> server logs.  It appears to work so far.  If it works overnight, 
> and no one
> has any objections, I'll commit to the CVS, both v2.1 and HEAD.
> 
>   --- Noel
> 
> -Original Message-
> From: Noel J. Bergman [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, January 26, 2003 14:45
> To: James Developers List
> Subject: RE: Log File Rotation
> 
> Serge,
> 
> I'll work on it ... looks like we need something like:
> 
>   
>  ... 
>  ... 
> true
> 
>   
> dd
>   
> 
>   
> 
> That should do daily rotation.  Will experiment.  We might also need to
> change the filename to eliminate the suffix, which may from from the
> rotation tag.  Will check the code.
> 
>   --- Noel
> 
> -Original Message-----
> From: Serge Knystautas [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, January 25, 2003 20:20
> To: James Developers List
> Subject: Re: Log File Rotation
> 
> 
> - Original Message -
> From: "Noel J. Bergman" <[EMAIL PROTECTED]>
> 
> 
> > James uses Avalon's logging mechanism.  See the documentation for the
> > FileTargetFactory, and then adjust SAR-INF/environment.xml accordingly.
> >
> > ref:
> >
> http://jakarta.apache.org/avalon/excalibur/logger/api/org/apache/a
valon/exca
libur/logger/factory/FileTargetFactory.html

[switching to dev]

Shouldn't we change James log files to rotate by default so they can't grow
unchecked?  Is this logger feature available in what we're using with the
2.1 branch?  I would +1 to changing it to rotate for the 2.1.1 release.

Serge Knystautas
Lokitech
Software - Strategy - Design
http://www.lokitech.com/


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: Log File Rotation

2003-01-26 Thread Danny Angus
FYI, when we had the log problem I spoke with Paul H. and messed with different log 
settings, I got rotaion working, but can't remeber how. :-( So it will work.

d.

> -Original Message-
> From: Noel J. Bergman [mailto:[EMAIL PROTECTED]]
> Sent: 26 January 2003 19:45
> To: James Developers List
> Subject: RE: Log File Rotation
> 
> 
> Serge,
> 
> I'll work on it ... looks like we need something like:
> 
>   
>  ... 
>  ... 
> true
> 
>   
> dd
>   
> 
>   
> 
> That should do daily rotation.  Will experiment.  We might also need to
> change the filename to eliminate the suffix, which may from from the
> rotation tag.  Will check the code.
> 
>   --- Noel
> 
> -Original Message-
> From: Serge Knystautas [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, January 25, 2003 20:20
> To: James Developers List
> Subject: Re: Log File Rotation
> 
> 
> - Original Message -
> From: "Noel J. Bergman" <[EMAIL PROTECTED]>
> 
> 
> > James uses Avalon's logging mechanism.  See the documentation for the
> > FileTargetFactory, and then adjust SAR-INF/environment.xml accordingly.
> >
> > ref:
> >
> http://jakarta.apache.org/avalon/excalibur/logger/api/org/apache/a
valon/exca
libur/logger/factory/FileTargetFactory.html

[switching to dev]

Shouldn't we change James log files to rotate by default so they can't grow
unchecked?  Is this logger feature available in what we're using with the
2.1 branch?  I would +1 to changing it to rotate for the 2.1.1 release.

Serge Knystautas
Lokitech
Software - Strategy - Design
http://www.lokitech.com/



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: Log File Rotation

2003-01-26 Thread Harmeet Bedi
- Original Message -
From: "Noel J. Bergman" <[EMAIL PROTECTED]>
> Attached is a version of james-server.xml to configure James for daily
> server logs.

Good improvement but it may be better to rotate on the file size rather than
date.

2 benefits:
- There may be log files that rarely change. No need to rotate them daily.
- The log file size could grow without upper bound even within a day.

Harmeet


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Log File Rotation

2003-01-26 Thread Noel J. Bergman
Attached is a version of james-server.xml to configure James for daily
server logs.  It appears to work so far.  If it works overnight, and no one
has any objections, I'll commit to the CVS, both v2.1 and HEAD.

--- Noel

-Original Message-
From: Noel J. Bergman [mailto:[EMAIL PROTECTED]]
Sent: Sunday, January 26, 2003 14:45
To: James Developers List
Subject: RE: Log File Rotation

Serge,

I'll work on it ... looks like we need something like:

  
 ... 
 ... 
true

  
dd
  

  

That should do daily rotation.  Will experiment.  We might also need to
change the filename to eliminate the suffix, which may from from the
rotation tag.  Will check the code.

--- Noel

-Original Message-
From: Serge Knystautas [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 25, 2003 20:20
To: James Developers List
Subject: Re: Log File Rotation


- Original Message -
From: "Noel J. Bergman" <[EMAIL PROTECTED]>


> James uses Avalon's logging mechanism.  See the documentation for the
> FileTargetFactory, and then adjust SAR-INF/environment.xml accordingly.
>
> ref:
>
http://jakarta.apache.org/avalon/excalibur/logger/api/org/apache/avalon/exca
libur/logger/factory/FileTargetFactory.html

[switching to dev]

Shouldn't we change James log files to rotate by default so they can't grow
unchecked?  Is this logger feature available in what we're using with the
2.1 branch?  I would +1 to changing it to rotate for the 2.1.1 release.

Serge Knystautas
Lokitech
Software - Strategy - Design
http://www.lokitech.com/




  


  





















  

  
  

  
  

  
  

  
  

  
  

  
  

  
  

  
  

  
  

  
  

  
  

  
  

  
  

  
  

  
  

  
  

  
















  
${app.home}/logs/default
%{time:dd/MM/yy HH:mm:ss} %5.5{priority} %{category}: %{message}\n%{throwable}
true

  
dd
  

  
  
${app.home}/logs/mailet
%{time:dd/MM/yy HH:mm:ss} %5.5{priority} %{category}: %{message}\n%{throwable}
true

  
dd
  

  
  
${app.home}/logs/james
%{time:dd/MM/yy HH:mm:ss} %5.5{priority} %{category}: %{message}\n%{throwable}
true

  
dd
  

  
  
${app.home}/logs/spoolmanager
%{time:dd/MM/yy HH:mm:ss} %5.5{priority} %{category}: %{message}\n%{throwable}
true

  
dd
  

  
  
${app.home}/logs/dnsserver
%{time:dd/MM/yy HH:mm:ss} %5.5{priority} %{category}: %{message}\n%{throwable}
true

  
dd
  

  
  
${app.home}/logs/remotemanager
%{time:dd/MM/yy HH:mm:ss} %5.5{priority} %{category}: %{message}\n%{throwable}
true

  
dd
  

  
  
${app.home}/logs/pop3server
%{time:dd/MM/yy HH:mm:ss} %5.5{priority} %{category}: %{message}\n%{throwable}
true

  
dd
  

  
  
${app.home}/logs/smtpserver
%{time:dd/MM/yy HH:mm:ss} %5.5{priority} %{category}: %{message}\n%{throwable}
true

  
dd
  

  
  
${app.home}/logs/nntpserver
%{time:dd/MM/yy HH:mm:ss} %5.5{priority} %{category}: %{message}\n%{throwable}
true

  
dd
  

  
  
${app.home}/logs/nntpstore
%{time:dd/MM/yy HH:mm:ss} %5.5{priority} %{category}: %{message}\n%{throwable}
true

  
dd
  

  
  
${app.home}/logs/mailstore
%{time:dd/MM/yy HH:mm:ss} %5.5{priority} %{category}: %{message}\n%{throwable}
true

  
dd
  

  
  
${app.home}/logs/usersstore
%{time:dd/MM/yy HH:mm:ss} %5.5{priority} %{category}: %{message}\n%{throwable}
true

  
dd
  

  
  
${app.home}/logs/objectstore
%{time:dd/MM/yy HH:mm:ss} %5.5{priority} %{category}: %{message}\n%{throwable}
true

  
dd
  

  
  
${app.home}/logs/connections
%{time:dd/MM/yy HH:mm:ss} %5.5

RE: Log File Rotation

2003-01-26 Thread Noel J. Bergman
Serge,

I'll work on it ... looks like we need something like:

  
 ... 
 ... 
true

  
dd
  

  

That should do daily rotation.  Will experiment.  We might also need to
change the filename to eliminate the suffix, which may from from the
rotation tag.  Will check the code.

--- Noel

-Original Message-
From: Serge Knystautas [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 25, 2003 20:20
To: James Developers List
Subject: Re: Log File Rotation


- Original Message -
From: "Noel J. Bergman" <[EMAIL PROTECTED]>


> James uses Avalon's logging mechanism.  See the documentation for the
> FileTargetFactory, and then adjust SAR-INF/environment.xml accordingly.
>
> ref:
>
http://jakarta.apache.org/avalon/excalibur/logger/api/org/apache/avalon/exca
libur/logger/factory/FileTargetFactory.html

[switching to dev]

Shouldn't we change James log files to rotate by default so they can't grow
unchecked?  Is this logger feature available in what we're using with the
2.1 branch?  I would +1 to changing it to rotate for the 2.1.1 release.

Serge Knystautas
Lokitech
Software - Strategy - Design
http://www.lokitech.com/



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: Log File Rotation

2003-01-26 Thread Harmeet Bedi
- Original Message - 
From: "Serge Knystautas" <[EMAIL PROTECTED]>
> I would +1 to changing it to rotate for the 2.1.1 release.

+1 from me too.

Harmeet


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Log File Rotation

2003-01-25 Thread Serge Knystautas
- Original Message -
From: "Noel J. Bergman" <[EMAIL PROTECTED]>


> James uses Avalon's logging mechanism.  See the documentation for the
> FileTargetFactory, and then adjust SAR-INF/environment.xml accordingly.
>
> ref:
>
http://jakarta.apache.org/avalon/excalibur/logger/api/org/apache/avalon/exca
> libur/logger/factory/FileTargetFactory.html

[switching to dev]

Shouldn't we change James log files to rotate by default so they can't grow
unchecked?  Is this logger feature available in what we're using with the
2.1 branch?  I would +1 to changing it to rotate for the 2.1.1 release.

Serge Knystautas
Lokitech
Software - Strategy - Design
http://www.lokitech.com/



--
To unsubscribe, e-mail:   
For additional commands, e-mail: