james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen McConnell <mcconn...@apache.org>
Subject Re: Excalibur Logger Improvements
Date Fri, 03 Oct 2003 17:16:21 GMT


Noel J. Bergman wrote:

>>>I know we can rotate on size, but what would be the easiest way to keep
>>>      
>>>
>just
>  
>
>>>the above sort of size limited log?  Is there a suitable log
>>>      
>>>
>implementation
>  
>
>>>already provided?
>>>      
>>>
>
>  
>
>>The way I deal with this is to create child loggers to seperate out
>>these sort of concerns.  In the SMTP server you are suipplied a logger
>>and in the code you can invoke something like:
>>    
>>
>
>  
>
>>   Logger protocolLogger = getLogger().getChildLogger( "protocol" );
>>    
>>
>
>  
>
>>In you log configration you should be able to declare a seperate
>>priority and possible seperate target for the james.smtp.protocol
>>logging category.
>>    
>>
>
>Yes, I understood that, Steven, although I thank for you the clear
>explanation.  You will find almost that exact line of code in James.java
>where it gets the mailet logger, since the Mailet log is a child of the
>James log.
>
>The question wasn't how to get the protocol logger, but rather how to have a
>log file limited to either a certain size or number of log entries.  I'm
>only familar with the rotation scheme, which could be used to rotate when
>the log reaches a limit, but that doesn't appear to directly handle the
>issue of keeping just the most recent messages, without having an external
>process deleting the old logs.
>

I had a sneaking suspision that I may have been ansering the wrong 
question!  Sorry about that.  What your describing about if a particular 
policy on a log target.  I honestly don't know much aboput this area - 
but just looking at the javadoc - my guess is that what you are 
describing is an file stategy with "append" enabled, "size" limit 
declared and no rotation strategy.  But I'm guessing!
 
Stephen.

>
>	--- Noel
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
>For additional commands, e-mail: dev-help@avalon.apache.org
>
>
>  
>

-- 

Stephen J. McConnell
mailto:mcconnell@apache.org




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


Mime
View raw message