Noel J. Bergman wrote:
justI know we can rotate on size, but what would be the easiest way to keep
implementationthe above sort of size limited log? Is there a suitable log
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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--
Stephen J. McConnell mailto:[EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
