• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RMI server logging problem

 
Ronald Wouters
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

when I start my server using loglevel finer for example, not only do I get my own logging of the URLyBird application, I also see all the internal workings of RMI like creating TCP endpoints, bindings being made to the registry etc...
Although thats great for debugging, I would like to be able to stop the internal RMI logging sometimes because it is crowding the logs an making things unclear.
I thought that the server property "java.rmi.server.logCalls" would help but the default value for that is already false.

So, is there any way I could get just my own loggings and not also the internal RMI stuff ?

Regards,
Ronald Wouters
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 11866
194
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ronald,

Can you just turn off logging for the java.rmi and javax.rmi packages?

Regards, Andrew
 
Ronald Wouters
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Andrew,

thanks for your suggestion. However, I am not sure that would do any good. Look at the following:

As you can see the logging apparently comes from some private packages from Sun itself and not from the core java.rmi and javax.rmi packages. Don't know if I can access those ... decompiling maybe

By the way how exactly would you go about switching off logging for a given package like "java.rmi" anyway ?
The way I understand it is that when you say Logger.getLogger("java.rmi") the only real requirement according to the api docs is that the string you pass into getLogger "should be a dot-separated name" needed to create hierarchical logging "namespaces". Using package names like "java.rmi" or "suncertify.db" is merely a suggestion. I could just as easily say getLogger("ronald") and getLogger("ronald.wouters") and still have a valid hierarchical logging namespace structure, right ?

Regards,
Ronald Wouters
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 11866
194
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ronald,

That's true, however if Sun are following their own recommended practices, then they should be naming their loggers in the standard way, so turning off logging for any sun packages should still work.

Regards, Andrew
 
Ronald Wouters
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Andrew,

I got it ! The following piece of code did the trick:

As you can see I needed to switch of logging for the sun.rmi package.
Apparently Sun is following its own recommendations at least as far as logging is concerned.

Thanks for the help.

Regards,
Ronald
[ February 03, 2006: Message edited by: Ronald Wouters ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic