Yes, you can assign logger name (or just use the namespace) to your
class like this.

public class MyRepository

        private static readonly ILog log = LogManager.GetLogger("Repository");
        ...
}

In the config file, you could then assign the level and appender(s) to
it separately from NHibernate.

    <logger name="Repository">
      <level value="DEBUG"/>
      <appender-ref ref="AdoNetAppender_Oracle"/>
    </logger>

    <logger name="NHibernate">
      <level value="ERROR" />
      <appender-ref ref="Error_AdoNetAppender_Oracle" />
    </logger>
    <logger name="NHibernate.SQL" additivity="false">
      <level value="DEBUG" />
      <appender-ref ref="AdoNetAppender_Oracle" />
    </logger>

hope this helps!
--karlkim

On Tue, Jul 7, 2009 at 5:29 PM, Jan Limpens<[email protected]> wrote:
> Can the logging facility be configured to
>
> 1) not use the log4net root, but a named logger and
> 2) not capture nhibernate logging (which I want to log separately and at a
> different level)?
>
> thanks!
>
> --
> Jan
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to