-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: Turn off NHibernate messages
PostPosted: Wed Sep 07, 2005 4:41 am 
Hello,
I'm doing a windows service which uses Log4Net and NHibernate. Is it possible to turn off NHibernate debug messages ? Here is a part of my App.config :

[code] <configSections>
<section name="nhibernate" type="System.Configuration.NameValueSectionHandler, System, Version=1.0.5500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, Custom=null" />
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
</configSections>

<!-- Informations requises par NHibernate. -->
<nhibernate>
<add key="hibernate.connection.provider" value="NHibernate.Connection.DriverConnectionProvider" />
<add key="hibernate.dialect" value="NHibernate.Dialect.MsSql2000Dialect" />
<add key="hibernate.query.substitutions" value="true 1, false 0" />
<add key="hibernate.connection.driver_class" value="NHibernate.Driver.SqlClientDriver" />
<add key="hibernate.connection.connection_string" value="server=*******;initial catalog=*******;User ID=*******;Password=*******;Min Pool Size=2" />
</nhibernate>

<!-- Informations requises par log4net. -->
<log4net>

<appender name="EventLogAppender" type="log4net.Appender.EventLogAppender" >
<applicationName value="Serveur AP+" />
<logName value="APPlus" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%message%newline%exception" />
</layout>
<evaluator type="log4net.Core.LevelEvaluator">
<threshold value="INFO" />
</evaluator>
</appender>

<appender name="SmtpAppender" type="log4net.Appender.SmtpAppender">
<to value="*******" /> <!-- Liste des adresses e-mail (s


Top
  
 
 Post subject:
PostPosted: Wed Sep 07, 2005 4:50 am 
Beginner
Beginner

Joined: Fri May 20, 2005 5:06 am
Posts: 28
<level value="INFO" /> => <level value="OFF" />

That should do.

See also: http://logging.apache.org/log4net/relea ... ation.html


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 07, 2005 5:35 am 
Quote:
<level value="INFO" /> => <level value="OFF" />

This doesn't work, now l don't get any log message from my app :(
It's as <level value="OFF" /> disables all logging...


Top
  
 
 Post subject:
PostPosted: Wed Sep 07, 2005 5:45 am 
Beginner
Beginner

Joined: Fri May 20, 2005 5:06 am
Posts: 28
You can use: "OFF", "INFO", "WARNING", "ERROR"

You can also make one log for NHibernate and one for the rest of the app

And you should read the link I sent you in my last post :wink:


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 07, 2005 1:28 pm 
Contributor
Contributor

Joined: Thu Jun 23, 2005 1:08 pm
Posts: 32
Location: Baltimore, MD
Specifically look at the "logger" tag.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.