NLog how to wirte to console and file at the sam etime
<logger name="*" minlevel="Debug" writeTo="console" />
<logger name="*" minlevel="Debug" writeTo="debugger" />
<logger name="*" minlevel="Debug" writeTo="FullCSVFile" />
NLog how to wirte to console and file at the sam etime
<logger name="*" minlevel="Debug" writeTo="console" />
<logger name="*" minlevel="Debug" writeTo="debugger" />
<logger name="*" minlevel="Debug" writeTo="FullCSVFile" />
NLog how to wirte to console and file at the sam etime
<target name="debugger" xsi:type="Debugger" layout="${level}>${message} (${exception:format=ToString})"/>
<target name="console" xsi:type="ColoredConsole" layout="${date:format=dd-MM-yyyy HH\:mm\:ss} - ${message}" />
<target name="FullCSVFile" xsi:type="File" fileName="${specialfolder:folder=LocalApplicationData}\YourApp\YourApp-${date:format=yyyy-MM-dd}.csv">
<layout xsi:type="CsvLayout">
<column name="Index" layout="${counter}" />
<column name="ThreadID" layout="${threadid}" />
<column name="Time" layout="${longdate}" />
<column name="Severity" layout="${level:uppercase=true}" />
<column name="Location" layout="${callsite:className=False:fileName=True:includeSourcePath=False:methodName=False}" />
<column name="Detail" layout="${message}" />
<column name="Exception" layout="${exception:format=ToString}" />
</layout>
</target>
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us