On 10 Dec 2004, at 00:40, David Graham wrote:


--- simon <[EMAIL PROTECTED]> wrote: <snip>

Regarding the addition of "entry/exit" logging APIs, I'm also in favour.
The code seems trivial, and it can be mapped to "TRACE" level for
logging implementations that don't provide "FINER" equivalents. It also
seems to me that:
log.enter("MyClass", "MyMethod", "Entering method");
is nice and readable.

Until you refactor the class name or method name. Then your logging code
is completely misleading. Considering the fact that IDEs allow you to
rename things without even looking at their implementation code, the
chance of the logging not keeping up with the names is high.

+1

it would make more sense to take a class (rather than a classname)

I would personally never use the enter/exit methods for those reasons. If
I wanted that kind of detail, I would use AspectJ.

+1

but that's the point: at the moment you can't crosscut and log an enter or exit to the object's logger because the appropriate method does not exist.

- robert


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



Reply via email to