[hibernate-dev] logging
Emmanuel Bernard
emmanuel at hibernate.org
Tue Apr 19 05:21:17 EDT 2011
For info, I've made public the page describing the log recommendations for JBoss projects
http://community.jboss.org/wiki/HowtologinJBossprojects
It seems that the FATAL-INFO level with named categories and class based categories for DEBUG-TRACE fits nicely.
Note that i18n debug and trace levels is not really needed.
On 15 avr. 2011, at 20:16, Hardy Ferentschik wrote:
> Forgot to answer this question.
> I like the idea of different channels, but not sure how complex it will
> get.
> How many channels did you have in mind?
>
> Also, the more complex the higher the chances that you use the logging
> framework in
> unintended ways.
>
> --Hardy
>
>
> On Tue, 12 Apr 2011 15:25:53 +0200, Steve Ebersole <steve at hibernate.org>
> wrote:
>
>> @MessageLogger( projectCode = "HHH" )
>> public interface CoreAdminMessageLogger extends BasicLogger {
>> @LogMessage(level=INFO)
>> @Message(value="Hello %s", id=1)
>> void sayHello(String name);
>> ...
>> }
>>
>> @MessageLogger( projectCode = "HHH" )
>> public interface CoreDevMessageLogger extends BasicLogger {
>> @LogMessage(level=INFO)
>> @Message(value="Loading the HelloComponent implementation %s",
>> id=501)
>> void loadingHelloComponent(String implementationName);
>> ...
>> }
>>
>> CoreAdminMessageLogger adminLog = Logger.getMessageLogger(
>> CoreAdminMessageLogger.class,
>> "org.hibernate.core.hello"
>> );
>>
>> CoreDevMessageLogger devLog = Logger.getMessageLogger(
>> CoreDevMessageLogger.class,
>> this.getClass()
>> );
>>
>> I realize this all seems over-engineered in many ways. I do see *some*
>> benefit. I guess the decision I need help weighing is whether this
>> amount of benefit out-weighs the "complexity".
>
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
More information about the hibernate-dev
mailing list