1

当我修改我的 app.config 以包含 ReflectSoftware 日志信息时,Ninjatrader 崩溃了。你能指出我没有正确配置它的地方吗?

?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <system.net>
        <defaultProxy>
            <proxy usesystemdefault="False"/>
        </defaultProxy>
    </system.net>
    <configSections>         
   <section name="insightSettings" type="ReflectSoftware.Insight.ConfigurationHandler,ReflectSoftware.Insight"/>
</configSections> 
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <!--
    In order to recieve location information, you must ensure the layout has the parameter ${callsite} and all 
    its properties set accordantly.
     -->
    <extensions>
        <add assembly="ReflectSoftware.Insight.Extensions.NLog"/>
    </extensions>
    <targets>
      <target name="ReflectInsight"
              xsi:type="ReflectInsight"
              instanceName="nlogInstance1"
              displayLevel="true"
              displayLocation="true"
              layout="${callsite:className=true:fileName=true:includeSourcePath=true:methodName=true}" />
    </targets>
    <rules>
        <logger name="*" minlevel="Trace" writeTo="ReflectInsight" />        
    </rules>
</nlog>
</configuration>
4

1 回答 1

2

通过在 Config 部分之后移动 xml 片段来修复

于 2013-01-22T20:43:40.280 回答