I am using the java.util.logging API and atatching several FileHandlers to a named logger to write the log messages to specific files. I see that this creates a lck (lock) file for each log file. The lock file is deleted when I close and remove the FileHandler from the named Logger.
When is it best to close the FileHandler? Do I want to keep it open so that I don't have to instantiate it everytime I want to do some logging (which will result in the lock file hanging around) or should I close and recreate it each time so the lock file goes away (seems a bit heavy handed for logging).
Really a question about best practices. I have used log4j a lot so I am trying to get my head around the differences.
Thanks,
Ed