To date its been easy because each module defined one message logger where
each reserved a set number of keys (1,000 per iirc).

As we get into more "functional-based" message loggers, that does become
more challenging.  A registrar of some kind where we track these is a good
idea imo, as you would seem to agree.


On Wed, May 7, 2014 at 2:00 PM, Hardy Ferentschik
<notifications@github.com>wrote:

> In
> hibernate-core/src/main/java/org/hibernate/internal/DeprecationLogger.java:
>
> > +package org.hibernate.internal;
> > +
> > +import org.jboss.logging.Logger;
> > +import org.jboss.logging.annotations.LogMessage;
> > +import org.jboss.logging.annotations.Message;
> > +import org.jboss.logging.annotations.MessageLogger;
> > +import org.jboss.logging.annotations.ValidIdRange;
> > +
> > +import static org.jboss.logging.Logger.Level.INFO;
> > +
> > +/**
> > + * Class to consolidate logging about usage of deprecated features.
> > + *
> > + * @author Steve Ebersole
> > + */
> > +@MessageLogger( projectCode = "HHH" )
>
>  That's why I asked for clarification of what you meant. If you are
> looking at this as a developer and wanting to know the existing
> MessageLoggers (e.g.) so you can reuse one or more messages, that's a
> different question than what is important to the user. Not saying it's any
> less important, just different.
>
> I get it now, you are not even mentioning the interface. That would be
> nice to know for a developer of course. Also which guidelines to follow in
> case you want to create a new category and how we handle key ranges. That
> were the things which I had in mind.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/hibernate/hibernate-orm/pull/737/files#r12395541>
> .
>