This is a bit strange, but I'm new to the registration frame and its use of properties. All the questions I can find on googling are "how do I make a record open with multiple files?" but today my question is how to make it stop the execution of several files at the same time. Here we go...
First of all: this project is limited to using java.util.logging, no, I can not switch to log4j or any other third-party package, yes, I know that they should be more awesome. :-)
So, when this applet launches, it launches this bit of code:
import java.util.logging.Logger; import java.util.logging.LogManager; // in startup routine: LogManager.getLogManager().readConfiguration( this.getClass().getResourceAsStream("/logging.properties"));
pull the properties file from the JAR and apply them, which works. It is assumed that readConfiguration() reset all existing settings when starting the virtual machine. The rest of the project has lines like
private final static Logger LOGGER = Logger.getLogger(NameOfClass.class.getName());
which I think is pretty standard. All our classes are in one package (for example, this is the TheProject project), and the funky name names / property hierarchy follow the same convention, because that's what java.util.logging is like.
The logging.properties file started as a copy of the one that comes with the Java 6 SE JRE, and then was modified. Now it looks like this:
handlers=java.util.logging.FileHandler,java.util.logging.ConsoleHandler
All that "works" is that the log messages are displayed on the Java console, as well as displayed on files on disk. Here's the weird part: as soon as the applet starts, two files open simultaneously, both TheProject0.0.log and TheProject1.0.log. When log messages are started, they are displayed in both files at the same time. Both files are an exact copy of each other at any time, including when they reach the maximum size and rotate (both!).
While only one JRE VM is running, I checked.
At any given time, both files open or both close, I checked. It is not like one is open for a longer or shorter time than the other.
The% u icon, which differs between the two file names, is documented as a "unique conflict resolution number" if the log file is already opened by another process, but I think it is not. Since both logs receive the same data and nothing else opens the file. (proof: Windows will not allow me to delete a single file while the virtual machine is running, but after the VM finally quits.)
Am I doing something stupid in the properties file, or am I misunderstanding how to load properties correctly or ...?