james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincenzo Gianferrari Pini" <vincenzo.gianferrarip...@praxis.it>
Subject RE: Message path tracing
Date Wed, 30 Jul 2003 09:42:17 GMT
As we are mainly talking about a message tracing facility, another approach could be to have
a mail attribute named something like "org.apache.james.trace", containing an ArrayList or
similar kind of Collection, that *always* gets log messages appended as soon as they are issued
(perhaps always at debug level) plus information about if and when a mail is "split" or resent
etc. The administrator can insert a "DumpTrace" mailet line in any appropriate place in the
config.xml file to have things printed to the mailet.log when needed. A "Log" mailet could
also be inserted if useful, with <toLog> and <toTrace> options etc.

This approach IMHO could be useful and quite easy to implement.

Vincenzo 

> -----Original Message-----
> From: Noel J. Bergman [mailto:noel@devtech.com]
> Sent: mercoledì 30 luglio 2003 1.42
> To: James Developers List
> Subject: RE: Message path tracing
> 
> 
> As I've said, I'm just mulling over how to provide this feature cleanly.
> Steve's comment got me thinking, and as I followed up looking at this, I
> believe that we could implement message tracing by doing something with
> child loggers, the same way that the Mailet Log is a child logger 
> of James.
> 
> If we added some new log categories, which I'll just call MessageTrace for
> now, e.g.,
> 
>     James.MessageTrace
>     smtpserver.MessageTrace
>     spoolmanager.MessageTrace
> 
> and a new log target:
> 
>     MessageTrace
> 
> we could aggregate trace messages directly into that log, and 
> control it via
> the standard Avalon log controls.  The contents of that log would be
> messages that record the flow of messages through the system.  We 
> would not
> have the msgID.log files that Serge proposed, but one can type "grep key
> tracelog" almost as easily as "cat key.tracelog", and the former scales
> better.
> 
> We could have a method in the relevant components like:
> 
>     messageTrace(Mail, String)
> 
> which would get the child logger and emit the mail key along with the
> message.  Avalon adds the other log data.
> 
> One area still to be resolved is what to do with matcher/mailet messages.
> Sure, we can, and probably should, modify the MailetContext to 
> add messages
> from matchers/mailets to the trace log, but unfortunately, the 
> log() method
> does not support identifying the message, so how do we associate the log
> entry with the mail message?
> 
> 	--- Noel
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.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