Log4Net en el Ejecutor de prueba de la unidad Resharper pero no en el Ejecutor de la unidad NUnit

I'm using the latest 5.x ReSharper plugin with NUnit 2.5.10. When using Log4Net to log some events for testing purposes the results show up in the ReSharper test window, but do not show up when using NUnit's console unit runner (run as part of our build processes). I've tried giving NUnit a .config file in the same location as the .nunit configuration file with the LogLevelThreshold set to DEBUG, but it still won't log the actual test information to either the output file or the text window in NUnit's GUI. I'm a bit stumped at this point, is there a way to get the two in sync in what's being displayed by test output? Thanks!

Configs in question:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <sectionGroup name="NUnit">
      <section name="TestCaseBuilder" type="System.Configuration.NameValueSectionHandler"/>
      <section name="TestRunner" type="System.Configuration.NameValueSectionHandler"/>
    </sectionGroup>
  </configSections>
   <NUnit>
    <TestRunner>
          <add key="DefaultLogThreshold" value="DEBUG" />
  </TestRunner>
  </NUnit>
</configuration>

And other config:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
  </configSections>
  <log4net debug="false">
    <appender name="console" type="log4net.Appender.ConsoleAppender, log4net">
      <layout type="log4net.Layout.PatternLayout, log4net">
        <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p %c{1}:%L - %m%n" />
      </layout>
    </appender>
    <appender name="DebugAppender" type="log4net.Appender.DebugAppender, log4net">
      <layout type="log4net.Layout.PatternLayout, log4net">
        <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p %c{1}:%L - %m%n" />
      </layout>
    </appender>
    <root>
      <level value="DEBUG" />
      <appender-ref ref="console" />
      <!--<appender-ref ref="DebugAppender" />-->
    </root>
    <logger name="NHibernate">
      <level value="INFO" />
    </logger>
    <logger name="NHibernate.SQL">
      <level value="DEBUG" />
    </logger>
  </log4net>
</configuration>

Gracias de antemano por cualquier ayuda.

preguntado el 08 de noviembre de 11 a las 16:11

0 Respuestas

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.