Re: centralized logging for Rio and Jini services

Calum Shaw-Mackay <[email protected]>
Newsgroups gmane.comp.java.sun.jini
Message-ID <[email protected]>
On 08/03/07, Johnson, Brad <[email protected]> wrote:
> Calum,
>
> Thanks for the help.
>
> Is there a way to set eros up so that it can be integrated in the
> logging.properties file. Rio sends its logs out using the
> java.util.logger handlers. I currently can setup a FileHandler,
> ConsoleHandler and SocketHandler in the logging.properties and in the
> Rio opstring config file and it works. At the moment I am able to see
> the log messages from all of my Jini servers in Chainsaw coming over the
> java.util.logging.SocketHandler.

Not really, because you have to lookup the Eros Service in order to
have the Logging handler supplied to you, hence you can't (or at least
I don't think you can) put it in the logging.properties file. Although
I could have a look at it a bit deeper and try and think of some work
around

>
> Can I just use the ErosHandler instead of the SocketHandler? (or do I
> use the ErosHandlerImpl?)

Again this is because this logging handler is downloaded remotely,
after the JVM has been started and probably after loggin.properties
file has been parsed and initialised

I am trying this now but I don't think my Rio
> service is sending any warning or severe messages. Is there a parameter
> I can set for PublishingLevel in a configuraion file instead of setting
> it in the code?

I'll look into it.

> Do I need an instance of Eros service running on each machine I have
> Jini on?

No, all you really need is 1 eros instance, but you have to do a
service lookup for each service/client you want to use Eros logging
in.

> The eros setup page has the following code. Do I need this to be in each
> of my Jini services? I tried to use it but I am having trouble with
> config.getEntry. I am not even to the point of compiling it because what
> object config refers to. Forgive my ignorance. Is this reading the
> eros.config file or is it some sort of Jini object?

Okay the source refres to some form of Prxy perparer done by your
service (part of Jini's security framework) - you don't actually need
this. you would just change this line

             eros = (ErosService) preparer.prepareProxy(svc.service);
to
             eros = (ErosService) svc.service;

I am working on allowing you to have differnet application labels
logged on a single logger depending on which logger (package name)
you're using, which helps for things like containers, etc. To be
honest I'll probably put a lot of that boilerplate code into some form
of Utility class once I get 5 spare mins.

Hope this helps

--Calum

--------------------------------------------------------------------------
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]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.