We need to define the set of categories we wish to have
The idea behind category is that they are more stable than classes and thus better for the user
I still think there is a usecase for fqcn in logging, especially when it comes to trace/debug messages. This might mean that we potentially need to loggers per class. Categories should be used for messages intended for the user. If possible categories should be "type-safe" and they should be listed and explained on the wiki - http://community.jboss.org/wiki/ContributingtoHibernateSearch .
Maybe we could extend our org.hibernate.search.util.logging.impl.LoggerFactory. We could introduce a category enum and a new make method which takes the category as parameter.
I agree with the general idea. Also we had this nice trick in place to generate the category dinamically from a stacktrace; this was quite clever but is generating lots of stacktraces which slowdown the boot process; not really AS7 compliant
+1 for the Enum, love the idea.
One problem with enums is that other modules will need to declare their category on core.
Better have an Interface category (with a toString() method essentially) and various module specific enums implementing it.
right. still we can follow this approach: there's no need to mandate other modules to use the same factory.
I've seen in Infinispan people extend the interface of the core module defining the error messages, in the hope that some can be reused. I never did this work out in practice so they can be totally independent IMHO.