Skip to content

Commit e2789e7

Browse files
author
Caitlin Bales (MSFT)
committed
Add NLog
1 parent 8f056e4 commit e2789e7

File tree

6 files changed

+3094
-0
lines changed

6 files changed

+3094
-0
lines changed

src/GraphODataTemplateWriter/GraphODataTemplateWriter.csproj

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@
3838
<Reference Include="Mono.TextTemplating">
3939
<HintPath>..\..\packages\Mono.TextTemplating.1.0.0\lib\Mono.TextTemplating.dll</HintPath>
4040
</Reference>
41+
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
42+
<HintPath>..\..\packages\NLog.4.4.11\lib\net45\NLog.dll</HintPath>
43+
<Private>True</Private>
44+
</Reference>
4145
<Reference Include="System" />
4246
<Reference Include="System.Core" />
4347
<Reference Include="System.Xml.Linq" />
@@ -119,6 +123,12 @@
119123
<None Include=".config\TemplateWriterSettings.json">
120124
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
121125
</None>
126+
<Content Include="NLog.config">
127+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
128+
</Content>
129+
<None Include="NLog.xsd">
130+
<SubType>Designer</SubType>
131+
</None>
122132
<None Include="packages.config" />
123133
</ItemGroup>
124134
<ItemGroup>
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd"
5+
autoReload="true"
6+
throwExceptions="false"
7+
internalLogLevel="Off" internalLogFile="c:\temp\nlog-internal.log">
8+
9+
<!-- optional, add some variables
10+
https://github.com/nlog/NLog/wiki/Configuration-file#variables
11+
-->
12+
<variable name="myvar" value="myvalue"/>
13+
14+
<!--
15+
See https://github.com/nlog/nlog/wiki/Configuration-file
16+
for information on customizing logging rules and outputs.
17+
-->
18+
<targets>
19+
<target name="logfile" xsi:type="File" fileName="file.txt" />
20+
<!--
21+
add your targets here
22+
See https://github.com/nlog/NLog/wiki/Targets for possible targets.
23+
See https://github.com/nlog/NLog/wiki/Layout-Renderers for the possible layout renderers.
24+
-->
25+
26+
<!--
27+
Write events to a file with the date in the filename.
28+
<target xsi:type="File" name="f" fileName="${basedir}/logs/${shortdate}.log"
29+
layout="${longdate} ${uppercase:${level}} ${message}" />
30+
-->
31+
</targets>
32+
33+
<rules>
34+
<!-- add your logging rules here -->
35+
<logger name="*" minlevel="Debug" writeTo="logfile" />
36+
<!--
37+
Write all events with minimal level of Debug (So Debug, Info, Warn, Error and Fatal, but not Trace) to "f"
38+
<logger name="*" minlevel="Debug" writeTo="f" />
39+
-->
40+
</rules>
41+
</nlog>

0 commit comments

Comments
 (0)