On Mon, Oct 10, 2016 at 4:48 PM, Michael Powell <[email protected]> wrote: > On Mon, Oct 10, 2016 at 4:12 PM, Michael Powell <[email protected]> wrote: >> Hello, >> >> Recently I adopted log4net for logging purposes and enabled it in my >> service application. I run in debug mode, and now I am receiving >> scores of messages apparently originating from NHibernate?
I figured it out. XmlConfigurator.Configure rather than BasicConfigurator.Configure! > I have tried a couple different configuration settings, all with no > effect. The logging continues no matter what. > > <log4net > > xsi:noNamespaceSchemaLocation="http://csharptest.net/downloads/schema/log4net.xsd" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > <appender type="log4net.Appender.ConsoleAppender" > name="ConsoleAppender"> > <layout type="log4net.Layout.SimpleLayout"> > <conversionPattern value="%date [%thread] %-5level > %logger %message%newline" /> > </layout> > <filter type="log4net.Filter.LoggerMatchFilter"> > <loggerToMatch value="NHibernate"/> > <acceptOnMatch value="false"/> > </filter> > </appender> > <appender type="Kingdom.Logger.NullAppender" name="NullAppender" /> > <root> > <level value="DEBUG" /> > <appender-ref ref="ConsoleAppender" /> > </root> > <logger name="NHibernate" additivity="false"> > <level value="OFF" /> > <appender-ref ref="NullAppender" /> > </logger> > <logger name="NHibernate.SQL" additivity="false"> > <level value="OFF" /> > <appender-ref ref="NullAppender" /> > </logger> > </log4net> > > I have tried turning logging OFF. I have tried implementing a "Null" > Appender; literally, DOES NOTHING. I even tried filtering out the > NHibernate events. But still no effect. > > Must be a manually configured logger? How can I disable this for > NHibernate? Or at minimum set the level to something less verbose, > like WARN, or even ERROR or FATAL? > >> This is well and good, but was entirely UNEXPECTED. I want to disable >> that now and just see messages from my application, but not sure how >> to do that without disabling for the app as well. >> >> First of all, curious how it could be seen in the first place. Second >> of all, unexpected. Third, what next? >> >> Regards, >> >> Michael Powell -- You received this message because you are subscribed to the Google Groups "nhusers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/nhusers. For more options, visit https://groups.google.com/d/optout.
