This project was created during a Hackathon day at my job at Aconex on Thursday, 29th March 2007. The project was designed to begin exploring how Java 5 Annotations might be used to create Logging Domains, which are a logically grouping of individual Logger objects. By convention, a Class normally has a single Logger defined with the name of the Logger matching the fully qualified package name. This forms one dimension, whereas Logging Domains would allow one to tag class as belonging to various Domains of interest, such as DAO, Service etc that couldn't be specified easily in the single dimensions package-naming structure. One can then control these set of Loggers belonging to the Domain via a single concept, the Domain, and be able to configure all the Loggers' Levels in one fell swoop, rather than battle with many Loggers either in JMX or via configuration files. The original idea started here in this mail thread: http://www.mail-archive.com/log4j-user@logging.apache.org/msg08198.html I tried to make it generic, such that a java.util.logging LoggingDomain could be easily bolted on in a similar way to how I got log4j's working. The basic principle to using this is something of the order of: * Create a normal class, and create at least one Logger that uses that classname as it's Logger name as part of the convention (this is important..., it's how we find Loggers that might be classes that might have the Annotations) * Mark your class with the @LoggingDomains annotation, and specify a set of Logging Domain names: @LoggingDomains( domains={"foo", "bar"} public class Eek { private final static Logger LOG = Logger.getLogger(Eek.class); .... * Use the AutomaticLog4jLoggingDomainJMXRegistator class and pass it an MBeanServer and LoggerRepository * Watch the LoggingDomains appear in your JMX MBean server and manipulate them accordingly! The best class to start from is this the example one: Log4jLoggingDomainJMXManagerTestHarness in org.apache.log4j.loggingdomains.jmx package of the 'log4j-test' folder. This module depends only on: * Java 5+ * log4j1.2.14 (because of TRACE) author: Paul Smith (psmith@apache.org)