Skip to content

Commit 9371528

Browse files
rathr1rathr1
authored andcommitted
Added Nlog code
1 parent cc47972 commit 9371528

5 files changed

Lines changed: 3256 additions & 0 deletions

File tree

SeleniumWebdriver/NLog.config

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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+
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+
<target name="ConsoleLogger" xsi:type="Console" layout="${longdate}|${level:uppercase=true}|${logger}|${message}" />
26+
<target name="FileLogger" xsi:type="File" fileName="D:\nlog\log.txt"
27+
archiveAboveSize="1000000" archiveNumbering="Rolling"
28+
layout="${longdate}|${level:uppercase=true}|${logger}|${message}" />
29+
30+
<!--
31+
Write events to a file with the date in the filename.
32+
<target xsi:type="File" name="f" fileName="${basedir}/logs/${shortdate}.log"
33+
layout="${longdate} ${uppercase:${level}} ${message}" />
34+
-->
35+
</targets>
36+
37+
<rules>
38+
<!-- add your logging rules here -->
39+
<logger name="*" enabled="true" minlevel="Error" writeTo="ConsoleLogger" />
40+
<logger name="*" enabled="true" minlevel="Debug" writeTo="FileLogger" />
41+
<!--
42+
Write all events with minimal level of Debug (So Debug, Info, Warn, Error and Fatal, but not Trace) to "f"
43+
<logger name="*" minlevel="Debug" writeTo="f" />
44+
-->
45+
</rules>
46+
</nlog>

0 commit comments

Comments
 (0)