james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Noel J. Bergman" <n...@devtech.com>
Subject RE: Message path tracing
Date Tue, 29 Jul 2003 23:41:40 GMT
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


Mime
View raw message