2016-10-27 26 views
0

MSTestとNLoggerを使用してログファイルにメッセージを書き込めましたが、VSテストエクスプローラの出力ウィンドウにメッセージが表示されません。以下は、NLoggerに使用している設定です。どんな助け?テストエクスプローラウィンドウでMSTestのNloggerを使用してVS出力ウィンドウにログメッセージを表示できません

<?xml version="1.0" encoding="utf-8" ?> 
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" 
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
     xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd" 
     autoReload="true" 
     throwExceptions="true" 
     internalLogLevel="Trace" internalLogFile="c:\temp\nlog-internal.log"> 

    <variable name="brief" value="${longdate} | ${threadid} | ${level} | ${callsite} | ${message}"/> 


    <targets> 
    <target name="logfile" xsi:type="File" fileName="C:\Test.log" layout="${brief}" /> 
    <target name="console" xsi:type="Console" /> 
    <target name="debugger" xsi:type="Debugger" layout="${logger}::${message}"/> 

    </targets> 

    <rules> 
    <logger name="*" minlevel="Info" writeTo="logfile" /> 
    <logger name="*" minlevel="Trace" writeTo="debugger" /> 
    <logger name="*" minlevel="Info" writeTo="console" /> 
</rules> 
</nlog> 

答えて

0

、出力リンクでテストを選択し、クリックしてください:

enter image description here

それはコンソールコンテンツ

enter image description here

で新しいウィンドウを開きます
関連する問題