我遇到Log4Net Appender的问题。 我运行Unity测试并希望我的Unity Testresult输出中的日志
My File Apprender正在运行,现在我还有2个:Console和Trace Appender。
<log4net>
<appender name="RollingFile" type="log4net.Appender.RollingFileAppender">
<file value="c:\tmp\Roche.NewGen.SSST.WorkflowScheduler.Tests.log"/>
<appendToFile value="false" />
<staticLogFileName value="true" />
<rollingStyle value="Size" />
<maxSizeRollBackups value="9" />
<maximumFileSize value="10MB" />
<encoding value="utf-8" />
<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
<layout type="log4net.Layout.PatternLayout">
<header value="Date:170?Thread:70?Level:62?Logger:300?Message[EOL]
" />
<conversionPattern value="[%utcdate][%level][Logger:%logger][Thread:%thread][Source:%type.%M:%L] %message %exception[EOL]%newline" />
</layout>
</appender>
<appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender" >
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="[%utcdate][%level][Logger:%logger][Thread:%thread][Source:%type.%M:%L] %message %exception[EOL]%newline" />
</layout>
</appender>
<appender name="TraceAppender" type="log4net.Appender.TraceAppender">
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="[%utcdate][%level][Logger:%logger][Thread:%thread][Source:%type.%M:%L] %message %exception[EOL]%newline" />
</layout>
</appender>
<root>
<level value="ALL"/>
<appender-ref ref="ConsoleAppender"/>
<appender-ref ref="RollingFile"/>
<appender-ref ref="TraceAppender" />
</root>
</log4net>
控制台Appender:我什么都看不到......
Trace Appender:它只是在调试时在控制台中写入。
但我需要最终“标准控制台输出”中的日志。但没有什么是可见的......