Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Application start logging using logging configuration file

Status
Not open for further replies.

SH4F33

Programmer
Apr 1, 2005
58
MU
Hello everybody, Im trying to log my application start to a file using the -Djava.util.logging.config.file command.
Ive created a configuration file called logging.properties.

It has the following lines:
Code:
handlers=java.util.logging.FileHandler
.level=INFO
java.util.logging.FileHandler.pattern = c:\myjini.log
java.util.logging.FileHandler.level=ALL
net.jini.loader.level=ALL

And in JBuilder, I have set the "VM Parameters" of my application to -Djava.util.logging.config.file=C:\JavaProjects\bb\classes\bb\logging.properties.

My classes are found in C:\JavaProjects\bb\classes\bb\ and the logging.properties file also is in the same directory.

When JBuilder launch my class,I can see no message being displayed in the message window. And if I look for the file c:\myjini.log, the file doesnt exist.

Here is how JBuilder launch my class:
Code:
C:\Borland\JBuilder2006\jdk1.5\bin\javaw -classpath "C:\JavaProjects\bb\classes;C:\Program Files\jini2_1\classes;C:\Borland\JBuilder2006\jdk1.5\lib\jconsole.jar;C:\Borland\JBuilder2006\jdk1.5\lib\htmlconverter.jar;C:\Borland\JBuilder2006\jdk1.5\lib\tools.jar;C:\Borland\JBuilder2006\jdk1.5\lib\dt.jar;C:\Borland\JBuilder2006\jdk1.5\jre\lib\rt.jar;C:\Borland\JBuilder2006\jdk1.5\jre\lib\plugin.jar;C:\Borland\JBuilder2006\jdk1.5\jre\lib\im\thaiim.jar;C:\Borland\JBuilder2006\jdk1.5\jre\lib\im\indicim.jar;C:\Borland\JBuilder2006\jdk1.5\jre\lib\ext\localedata.jar;C:\Borland\JBuilder2006\jdk1.5\jre\lib\ext\sunjce_provider.jar;C:\Borland\JBuilder2006\jdk1.5\jre\lib\ext\dnsns.jar;C:\Borland\JBuilder2006\jdk1.5\jre\lib\ext\sunpkcs11.jar;C:\Borland\JBuilder2006\jdk1.5\jre\lib\charsets.jar;C:\Borland\JBuilder2006\jdk1.5\jre\lib\deploy.jar;C:\Borland\JBuilder2006\jdk1.5\jre\lib\javaws.jar;C:\Borland\JBuilder2006\jdk1.5\jre\lib\jsse.jar;C:\Borland\JBuilder2006\jdk1.5\jre\lib\jce.jar"  -Djava.security.policy=C:\JavaProjects\bb\classes\bb\policy.all -Djava.util.logging.config.file=C:\JavaProjects\bb\classes\bb\logging.properties bb.test

Is there something wrong in the logging.properties file?
Thanks in advance.
 
I've never used Sun's Logging API (I use Log4J instead) so I couldn't say.

I do think this is more of a 'pure Java' question, though. If nobody helps you here, try reposting on forum269. Someone there will have the answers, I'm sure.

Tim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top