The Logger class is maybe 10 years old. There maybe better ways to do stuff now, but here's what it does...
On May 18, 2011, at 5:50 AM, Shawn Jiang wrote: > 1, What's the benefit to use a customized logger factory with assigned > category ? The i18n support is behind the logger API. Might be a more modern way to do that these days. The categories are nice instead of packages as we occasionally move code around between classes or packages and the configured log output remains stable. Most the categories are used by several parts of the code which is nice as it keeps things simple from a configuration perspective. Basically, most administrators don't care about the structure of our code and don't want to be bothered when it changes. > 2, What's the reason to use "org.apache.openejb.util.resources" instead > of the owner class name as the loggers' basename in most of classes ? That one is legacy. We should split up all those messages into the related parts of code. As long as we're on the subject we should take another shot at switching our default over to java.util.logging. If we can get the same output format from java.util.logging and lose a log4j dependency, that could be nice. -David
