james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Norman Maurer <nor...@apache.org>
Subject Re: [smtp] Introduce Context Sensitive Logging?
Date Sun, 06 Sep 2009 09:00:34 GMT
+1,

It is definitly a bonus to be able to easily find all operations which
belongs to one "transaction". I'm not sure howto implement it but I
think it would even make sense to generate an id and prefix every log
message with it which belongs to the "whole" workflow. This would
allow us to find the right mailet logs which are related previous smtp
transaction ( just an example). This would make tracing the whole
"flow" a lot easier..

Just my 2 cents..

Bye,
Norman

2009/9/6 Robert Burrell Donkin <robertburrelldonkin@gmail.com>:
> On Sat, Sep 5, 2009 at 8:22 PM, Norman Maurer<norman@apache.org> wrote:
>> +1,
>>
>> this makes sense.  I would even like to eliminate the whole "extends
>> AbstractLogEnabled" stuff. I think there is no need to extend a class
>> just to be able to log..
>
> +1
>
> after exploring a few different options in IMAP, i found that context
> sensitive logging was the best replacement. i'd be very happy switch
> all james servers to this paradigm.
>
> with the IMAP server, the prefix is based on the handler for the
> request[1]. IMAP has long running conversations so this allows each
> conversation to be isolated just by using a simple grep. the start of
> the conversation provides information about the session so i don't
> bother prefixing with a session. most IMAP clients run many
> connections in parrallel so i found it very difficult to debug without
> being able to isolate a conversation.
>
> AIUI SMTP has shorter running conversations so perhaps may need to
> consider prefixing with some session information as well (but not sure
> what, exactly)
>
> - robert
>
> [1] logging sample
> 04/09/09 08:08:09 DEBUG imapserver: Retrieving a
> org.apache.james.socket.DelegatingJamesHandler from the pool
> 04/09/09 08:08:09 DEBUG imapserver: Handler [Handler-2] obtained from pool.
> 04/09/09 08:08:09 DEBUG imapserver: Retrieving a
> org.apache.james.socket.DelegatingJamesHandler from the pool
> 04/09/09 08:08:09 DEBUG imapserver: Handler [Handler-4] obtained from pool.
> 04/09/09 08:08:09 INFO  imapserver: [Handler-2]Connection from
> akrotiri. (10.0.0.27)
> 04/09/09 08:08:09 DEBUG imapserver: Connection from akrotiri.
> (10.0.0.27) opened.
> 04/09/09 08:08:09 INFO  imapserver: [Handler-4]Connection from
> akrotiri. (10.0.0.27)
> 04/09/09 08:08:09 DEBUG imapserver: Connection from akrotiri.
> (10.0.0.27) opened.
> 04/09/09 08:08:12 DEBUG imapserver: [Handler-2] Calling start()
> 04/09/09 08:08:12 DEBUG imapserver: [Handler-2] Watchdog on thread
> 'default Worker #15' has time to sleep 1800000
> 04/09/09 08:08:12 DEBUG imapserver: [Handler-4] Calling start()
> 04/09/09 08:08:12 DEBUG imapserver: [Handler-4] Watchdog on thread
> 'default Worker #7' has time to sleep 1800000
> 04/09/09 08:08:12 DEBUG imapserver: [Handler-2] Got <tag>: 1
> 04/09/09 08:08:12 DEBUG imapserver: [Handler-2] Got <command>: capability
> 04/09/09 08:08:12 DEBUG imapserver: [Handler-2] No mailbox selected
> 04/09/09 08:08:12 DEBUG imapserver: [Handler-2] Calling reset() on
> thread 'default Worker #15'
> 04/09/09 08:08:12 DEBUG imapserver: [Handler-4] Got <tag>: 1
> 04/09/09 08:08:12 DEBUG imapserver: [Handler-4] Got <command>: capability
> 04/09/09 08:08:12 DEBUG imapserver: [Handler-4] No mailbox selected
> 04/09/09 08:08:12 DEBUG imapserver: [Handler-4] Calling reset() on
> thread 'default Worker #7'
> 04/09/09 08:08:12 DEBUG imapserver: [Handler-2] Got <tag>: 2
> 04/09/09 08:08:12 DEBUG imapserver: [Handler-2] Got <command>: login
> 04/09/09 08:08:12 DEBUG imapserver: [Handler-2] INBOX exists. No need
> to create it.
> 04/09/09 08:08:12 DEBUG imapserver: [Handler-2] Calling reset() on
> thread 'default Worker #15'
> 04/09/09 08:08:12 DEBUG imapserver: [Handler-2] Got <tag>: 3
> 04/09/09 08:08:12 DEBUG imapserver: [Handler-2] Got <command>: namespace
> 04/09/09 08:08:12 DEBUG imapserver: [Handler-2] No mailbox selected
> 04/09/09 08:08:12 DEBUG imapserver: [Handler-2] Calling reset() on
> thread 'default Worker #15'
> 04/09/09 08:08:12 DEBUG imapserver: [Handler-4] Got <tag>: 2
> 04/09/09 08:08:12 DEBUG imapserver: [Handler-4] Got <command>: logout
> 04/09/09 08:08:12 DEBUG imapserver: [Handler-4] Calling stop() on
> thread 'default Worker #7'
> 04/09/09 08:08:12 INFO  imapserver: Connection from akrotiri.
> (10.0.0.27) closed.
> 04/09/09 08:08:12 DEBUG imapserver: [Handler-4] Closing socket
> 04/09/09 08:08:12 DEBUG imapserver: [Handler-4] Calling
> disposeWatchdog() on thread 'default Worker #7'
> 04/09/09 08:08:12 DEBUG imapserver: Returning Handler [Handler-4] to pool.
> 04/09/09 08:08:12 DEBUG imapserver: Returning a
> org.apache.james.socket.DelegatingJamesHandler to the pool
> 04/09/09 08:08:12 DEBUG imapserver: [null] Watchdog on thread 'default
> Worker #7' is exiting run().
> 04/09/09 08:08:12 DEBUG imapserver: [Handler-2] Got <tag>: 4
> 04/09/09 08:08:12 DEBUG imapserver: [Handler-2] Got <command>: list
> 04/09/09 08:08:12 DEBUG imapserver: [Handler-2] Calling reset() on
> thread 'default Worker #15'
> 04/09/09 08:08:12 DEBUG imapserver: [Handler-2] Got <tag>: 5
>
> ---------------------------------------------------------------------
> 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