• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

RMI server logging problem

 
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author and jackaroo
Posts: 12200
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 198
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 12200
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 198
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic