开发者

Where are logs located while running NUnit?

开发者 https://www.devze.com 2023-01-30 17:19 出处:网络
I\'m running NUnit tests from Resharper. I want to track exe开发者_StackOverflow中文版cution process so my question is where can I find logs produced by my application?

I'm running NUnit tests from Resharper. I want to track exe开发者_StackOverflow中文版cution process so my question is where can I find logs produced by my application?

I use NLog, logger output path is relative, e.g. logs\mylog.txt.


I have a similar setup with my current project and for the unit tests, my NLog output goes to \UnitTests\bin\Debug\Logs. The logger is set up as follows in NLog.config (this produces a daily log file):

<target name="FileLog" xsi:type="File" fileName="${basedir}/logs/${shortdate}_log.txt"


If you aren't getting any output at all from NLog, try adding the throwExceptions, internalLogLevel and internalLogFile attributes to your NLog.config like this:

<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      throwExceptions="true"
      internalLogLevel="Debug"
      internalLogFile="nlog_log.log">

I realise this is an old question but just in case you haven't found the answer yet, I though I would see if this helps.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号