harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexei Zakharov" <alexei.zakha...@gmail.com>
Subject Re: [classlib] JNDI provider's dependency on logging
Date Tue, 30 May 2006 15:04:20 GMT
Tim,

> e.g. from DNSName.java:

I agree, this is not the best example of using logger. :) However, you
can find much better examples of using logger in Resolver.java.

> Seriously, VMs know exactly which methods are being executed and their
> arguments, if we need trace or debug we can get lots of information from
> there.  The logging statements are the equivalent of printf's in the
> code to see what is happening.

I agree that we can extract low-level information from VM. But this
cannot replace high-level logs like:
"connected to server1.blah.blah.com"
"incomplete answer was received from server2.example.org"
"redirecting to new workzone X"
and so on.
It requires great efforts to extract high level stuff from low level
info. Removing logs probably increase the performance a little bit.
But this also dramatically increase debug and maintenance costs of the
system. Harmony in our case. We just need to consider what do we need
more.

2006/5/30, Tim Ellison <t.p.ellison@gmail.com>:
> For this provider I don't think it is useful to have calls out to
> java.util.logging.  We have much more flexibility if we are conservative
> about the modules we use to implement a given area of functionality.
>
> e.g. from DNSName.java:
>  ...
>  try {
>    k = this.compareTo(name);
>  } catch (ClassCastException e) {
>    // impossible case
>    ProviderMgr.logger.log(Level.SEVERE, "impossible case", e);
>  }
>  ...
>
> Regards,
> Tim

-- 
Alexei Zakharov,
Intel Middleware Product Division

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Mime
View raw message