-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
57 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- XSD manual extracted from package NLog.Schema: https://www.nuget.org/packages/NLog.Schema--> | ||
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" | ||
xsi:schemaLocation="NLog NLog.xsd" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
autoReload="true" | ||
internalLogFile="c:\temp\console-example-internal.log" | ||
internalLogLevel="Info"> | ||
|
||
<!-- the targets to write to --> | ||
<targets> | ||
<!-- write logs to file --> | ||
<!-- write logs to the visual studio code "debug console" --> | ||
<target name="logconsole" xsi:type="ColoredConsole" enableAnsiOutput="true" | ||
layout="${time}|${uppercase:${level:padding=5}}|${mdlc:item=ScopeName}|${ndlctiming:currentScope=true}|${logger}|${message} ${exception:format=tostring:innerFormat=tostring:maxInnerExceptionLevel=2}" | ||
useDefaultRowHighlightingRules="true"> | ||
<!-- explicitly use nlog color coding with a few adjustments for consistent display --> | ||
<highlight-row condition="level == LogLevel.Fatal" foregroundColor="Red" /> | ||
<highlight-row condition="level == LogLevel.Error" foregroundColor="Yellow" /> | ||
<highlight-row condition="level == LogLevel.Warn" foregroundColor="Magenta" /> | ||
<highlight-row condition="level == LogLevel.Info" foregroundColor="Cyan" /> | ||
<highlight-row condition="level == LogLevel.Debug" foregroundColor="Green" /> | ||
<highlight-row condition="level == LogLevel.Trace" foregroundColor="DarkGray" /> | ||
</target> | ||
|
||
<target xsi:type="File" name="logfile" | ||
fileName="${specialfolder:folder=ApplicationData}\SharpFM.log" | ||
layout="${longdate}|${uppercase:${level:padding=5}}|${mdlc:item=ScopeName}|${ndlctiming:currentScope=true}|${logger}|${message} ${exception:format=tostring:innerFormat=tostring:maxInnerExceptionLevel=2}" /> | ||
</targets> | ||
|
||
<!-- rules to map from logger name to target --> | ||
<rules> | ||
<logger name="*" minlevel="Trace" writeTo="logfile,logconsole" /> | ||
</rules> | ||
</nlog> |