1+ <?xml version =" 1.0" ?>
2+ <configuration xmlns : xdt =" http://schemas.microsoft.com/XML-Document-Transform" >
3+ <configSections xdt : Transform =" InsertBefore(/configuration/*[1])" />
4+ <configSections xdt : Locator =" XPath(/configuration/configSections[last()])" >
5+ <section name =" log4net"
6+ type =" log4net.Config.Log4NetConfigurationSectionHandler, log4net"
7+ xdt : Transform =" InsertIfMissing"
8+ xdt : Locator =" Match(name)" />
9+ </configSections >
10+ <configSections xdt : Transform =" RemoveAll" xdt : Locator =" Condition(count(*)=0)" />
11+
12+ <log4net xdt : Transform =" InsertIfMissing" >
13+ <!--
14+ Here is a sample log4net configuration. Please review and customise this,
15+ referring to the documentation which is available at the URL below. Log4net
16+ is a powerful and feature-rich logging platform; the following configuration
17+ is an example of one of the simplest possible configurations available.
18+
19+ More information is available at:
20+
21+ https://logging.apache.org/log4net/release/manual/configuration.html
22+
23+ This sample configuration logs all messages (at the DEBUG level) from Zpt-Sharp
24+ and its plugins. It also records messages at the WARN level for any other
25+ sources which write to log4net. The log file itself is written to a file
26+ named MyApplication.log.
27+
28+ You may read more about logging ZPT-Sharp at:
29+
30+ http://csf-dev.github.io/ZPT-Sharp/logging.html
31+
32+ <root>
33+ <level value="WARN" />
34+ <appender-ref ref="FileAppender" />
35+ </root>
36+ <appender name="FileAppender" type="log4net.Appender.FileAppender">
37+ <file value="MyApplication.log" />
38+ <appendToFile value="false" />
39+ <layout type="log4net.Layout.PatternLayout">
40+ <conversionPattern value="[%-5level] [%logger] %message%n" />
41+ </layout>
42+ </appender>
43+ <logger name="CSF.Zpt">
44+ <level value="DEBUG" />
45+ </logger>
46+ -->
47+ </log4net >
48+
49+ <system .diagnostics xdt : Transform =" InsertIfMissing" />
50+
51+ <system .diagnostics>
52+ <sources xdt : Transform =" InsertIfMissing" />
53+ <switches xdt : Transform =" InsertIfMissing" />
54+ <sharedListeners xdt : Transform =" InsertIfMissing" />
55+ </system .diagnostics>
56+
57+ <system .diagnostics>
58+ <sources >
59+ <source name =" CSF.Zpt"
60+ switchName =" ZptLog4NetSwitch"
61+ switchType =" System.Diagnostics.SourceSwitch"
62+ xdt : Transform =" InsertIfMissing"
63+ xdt : Locator =" Match(name)" >
64+ <listeners >
65+ <add name =" ZptLog4netListener" />
66+ <remove name =" Default" />
67+ </listeners >
68+ </source >
69+ </sources >
70+ <switches >
71+ <add name =" ZptLog4NetSwitch"
72+ value =" Verbose"
73+ xdt : Transform =" InsertIfMissing"
74+ xdt : Locator =" Match(name)" />
75+ </switches >
76+ <sharedListeners >
77+ <add name =" ZptLog4netListener"
78+ type =" CSF.Zpt.SelfConfiguringLog4netTraceListener, CSF.Zpt.Log4net"
79+ xdt : Transform =" InsertIfMissing"
80+ xdt : Locator =" Match(name)" >
81+ <filter type =" System.Diagnostics.EventTypeFilter" initializeData =" Verbose" />
82+ </add >
83+ </sharedListeners >
84+ </system .diagnostics>
85+
86+ </configuration >
0 commit comments