Tuesday, October 2, 2001 08:41 AM
getClass.getName()+".pattern". When this is executed you'll get the name of the class with ".pattern" appended to it. So if that code existing inside your my.package.Foo.java class you would get:
LogManager uses the singleton pattern (there exists only one of them in your entire application, which is reasonable for a LogManager) and the LogManager.getLogManager() method call will return a reference to it.
We then call the getProperty() method on the LogManager class, passing the parameter that we calculated before ("my.package.Foo.pattern"). So you'll get back the string that is associated with "my.package.Foo.pattern".
This association is set up using the configuration file. The configuration file is set up either by changing the default configuration file: "lib/logging.properties" or you change the system property "java.util.logging.config.file" to read from a different file, or you call LogManager.readConfiguration(InputStream ins).
Hope that helps.