A followup on what I've found out for turning on the default RMI logging:
1) Refer to
RMI Implementation Logging for the list of RMI logging properties.
2) Pass "-C-Djava.rmi.server.logCalls=true" when you run the rmid program. You might also want to pass "-C-Dsun.rmi.log.debug=true" as well.
An example command looks like:
${JAVA_HOME}/bin/rmid -J-Djava.security.policy=mypolicy.file -C-Djava.rmi.server.logCalls=true -C-Dsun.rmi.log.debug=true &
* Note: This caused the RMI logging output to be printed via System.err on my console window which wasn't very helpful since I wanted it saved to a file. In my search I came across these 2 tidbits in a couple of RMI books:
The easiest way to get the "sun.rmi.*" logs to be saved to a log file is to redirect System.err
You have to set the logging destination before you invoke any RMI methods. Once RMI starts loggging to a particular PrintSteam, it keeps logging to that PrintStream.
Check this link for code on how to redirect to System.err:
Redirecting streams The conclusion:
The code that redirects System.err is run only when a remote method is called, mainly because I'm using Activatable objects (the implementation classes reference a constants class which has a static code block that has the redirection code). Because of that, I can't satisfy the condition stated in the second quote which means I still don't know how to get the RMI logging to be output to a file.
At the very least, I can at least see the RMI log output now.
Hope this helps anyone else.
[ February 18, 2004: Message edited by: David Duran ]