Re: Catching mis-configuration earlier: Reggie and localhost

Gregg Wonderly <[email protected]> Mon, 29 Oct 2007 14:20:01 -0500
Newsgroups gmane.comp.java.sun.jini
Message-ID <[email protected]>
Patrick Wright wrote:
> Mark, Bob--thanks for your replies re: caching loopback addresses in
> event listener registrations.
>
> A follow-up: I am trying to configure logging.properties to give me
> just the information I need. The relevant log entry on registering a
> new event listener comes from Reggie, in
> com.sun.jini.reggie.RegistrarImpl. I tried adding the following to the
> log
>
> com.sun.jini.reggie.RegistrarImpl$DecodeRequestTask.level=INFO
> com.sun.jini.reggie.RegistrarImpl.level=FINE
>
> These were ignored and there was no output at level FINE. However, adding
>
> com.sun.jini.reggie.level = FINE
>
> To the entries does give me the output, but includes the
> DecodeTaskRequest, which fills the log with exception entries (which I
> believe from prior mail threads are harmless)
> INFO   | jvm 1    | 2007/10/29 18:15:04 | Oct 29, 2007 6:15:04 PM
> com.sun.jini.reggie.RegistrarImpl$DecodeRequestTask run
> INFO   | jvm 1    | 2007/10/29 18:15:04 | HANDLED: exception decoding
> multicast request from /10.3.17.1:43,202
> INFO   | jvm 1    | 2007/10/29 18:15:04 |
> com.sun.jini.discovery.DiscoveryProtocolException: invalid service ID
> count: 775106098
> .
> .
> .
>
> I would like to configure it to at least exclude these exception
> entries while still seeing my event listener entries land in the
> log--does anyone know how to achieve this?

I like to have the logger name in the log output so that I can tell exactly what
logger to configure with which level.  If you have a formatter which will do
that for you, you might change your logging .properties file to use

handlers=java.util.logging.ConsoleHandler
java.util.logging.ConsoleHandler.formatter=...formatter class name...

If you don't have such a formatter, you might look at the
org.wonderly.log.StreamFormatter formatter in the http://startnow.dev.java.net
project.  It should do what you want, and you can, of course take the source and
adjust it.  That version is older than the one I use in production, but should
work fine.

Gregg Wonderly

--------------------------------------------------------------------------
Getting Started:     http://www.jini.org/wiki/Category:Getting_Started
Community Web Site:  http://jini.org
jini-users Archive:  http://archives.java.sun.com/archives/jini-users.html
Unsubscribing:       email "signoff JINI-USERS"  to [email protected]