On 18 Dec 2004, at 23:07, Scott Deboy wrote:

Enter and exit should not be defined as severities. This is useful information, but orthogonal to a logging event's severity attribute.

One way to provide entry/exit information is to overload the logger methods to take a map, and require the user to adhere to use-case specific conventions for keys and values.

For example, to track entry and exit as we cross component boundaries, these entries might be sufficient to identify an event:

Key Name         Value
-------------------------
boundary.type     component
boundary.state    entry

Similarly, to track entry and exit as we cross class boundaries:

Key Name         Value
-------------------------
boundary.type     class
boundary.state    exit

This provides a general mechanism for extending what information an event provides - without codifying use-case specific attributes as methods in commons-logging.

Again, the user would be responsible for conforming to naming conventions for the map entries (possibly with the aid of helper methods to build the map) in order to discover these use-case specific events.

interesting :)

this is a classic component design dilemma: more specific, strongly contracted methods or fewer, more generic ones. i'm not really convinced either way as yet. JCL has benefitted from a compact, strongly contracted API and it would be good to keep it that way.

IIRC ceki (in the past) convinced me (and probably a lot of others too) that there really isn't very much use in a plethura of logging levels. applications shouldn't really need anything much lower than debug. even for components, trace is more than a little debatable (though we went for it). a load of severities may look good in a policy document but are much less useful in practice and their usage patterns do not really generalize well. so, i don't really see the need for any more severities in JCL.

richard's proposal to add symantic methods (rather than severities) is therefore interesting. exit and entry tracing is common. at the moment, this works rather poorly when JCP is used with log4j: most people log these at trace which is mapped to debug by the bridge. unfortunately, this has the effect of making debug level almost unusable. separate, symantically meaningful methods would have the advantage that the bridge will know enough to make better choices.

(so, i'm a little unsure about this issue at the moment.)

- robert


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to