How to configure NHibernate Profiler so that I can enable / disable it without changing the code?

I am trying to follow the directions on the NHProf website , but it seems it cannot make it work. What am I missing?

I installed the log4net configuration section in my web.config:

<configSections>
  <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net/>
  ...
</configSections>
...
<log4net>
  <appender name="NHProfAppender" type="HibernatingRhinos.Profiler.Appender.NHibernate.NHProfAppender, HibernatingRhinos.Profiler.Appender">
    <sink value="http://localhost:22897"/>
  </appender>
  <logger name="HibernatingRhinos.Profiler.Appender.NHibernate.NHProfAppender.Setup">
    <appender-ref ref="NHProfAppender"/>
  </logger>
<log4net>

And in Global.asax:

protected void Application_Start(...)
{
  ...
  log4net.Config.XmlConfigurator.Configure();
  ...
}

The assembly HibernatingRhinos.Profiler.Appender.dllis in my catalog bin\, but there are still no cubes. I was able to verify that loglognet log4net is being created with the correct name, but I do not think the application is associated with it. Any ideas?

+1
source share
2 answers

, , , . , , .

0

, NHProf , , , (22897). /, .

0

All Articles