I am using a Java Logger in my application with FileHandler set to /DemoApp/AAA.log. But my JVM creates empty java.log and java.log.lck files in my home directory every time i run the app.
Does any one have any idea why this is happening?
Try loading this property file as the logger configuration:
handlers=java.util.logging.FileHandler
java.util.logging.FileHandler.level=ALL
java.util.logging.FileHandler.append=true
java.util.logging.FileHandler.formatter=java.util.logging.SimpleFormatter
java.util.logging.FileHandler.pattern=testlog%u.log
.level=ALL
This should output a testlog0.log file to the working directory of the program. If this does not solve the problem, please provide a minimal example. Also keep this in mind when using directories.