Skip to content

Commit 293eb26

Browse files
committed
Host .dna fixes
1 parent 2a6fa9a commit 293eb26

File tree

2 files changed

+5
-158
lines changed

2 files changed

+5
-158
lines changed
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
<DnaLibrary Name="Excel-DNA IntelliSense Host" RuntimeVersion="v4.0">
2-
<ExternalLibrary Path="ExcelDna.IntelliSense.Host.dll" />
2+
<ExternalLibrary Path="ExcelDna.IntelliSense.Host.dll" Pack="true" />
3+
<Reference Path="ExcelDna.IntelliSense.dll" Pack="true" />
4+
<Reference Path="Interop.UIAutomationClient.dll" Pack="true" />
5+
<Reference Path="UIAComWrapper.dll" Pack="true" />
36
</DnaLibrary>
Lines changed: 1 addition & 157 deletions
Original file line numberDiff line numberDiff line change
@@ -1,165 +1,9 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<configuration>
3-
4-
<!--
5-
This .config file contains the various configuration examples.
6-
7-
* log4net
8-
* NLog
9-
* ExplicitDefaults
10-
* DisableLogging
11-
* VerboseLogging
12-
* FileLogging
13-
14-
-->
15-
16-
<!-- ============= Begin log4net ================ -->
17-
18-
<!--
19-
<configSections>
20-
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
21-
</configSections>
223
<system.diagnostics>
234
<sources>
24-
<source name="ExcelDna.Integration" switchValue="Verbose">
25-
<listeners>
26-
<remove name="Default" />
27-
<add name="LogDisplay" type="ExcelDna.Logging.LogDisplayTraceListener,ExcelDna.Integration">
28-
<filter type="System.Diagnostics.EventTypeFilter" initializeData="Off"/>
29-
</add>
30-
<add name="Log4NetListener" type="Cavity.Diagnostics.Log4NetTraceListener,Logging" >
31-
<filter type="System.Diagnostics.EventTypeFilter" initializeData="All"/>
32-
</add>
33-
</listeners>
5+
<source name="ExcelDna.IntelliSense" switchValue="Off">
346
</source>
357
</sources>
368
</system.diagnostics>
37-
<log4net>
38-
<appender name="DebugAppender" type="log4net.Appender.DebugAppender" >
39-
<layout type="log4net.Layout.PatternLayout">
40-
<conversionPattern value="LOG4NET: %date [%thread] %-5level %logger [%ndc] - %message%newline" />
41-
</layout>
42-
</appender>
43-
<root>
44-
<level value="INFO" />
45-
<appender-ref ref="DebugAppender" />
46-
</root>
47-
</log4net>
48-
-->
49-
50-
<!-- ============= End log4net ================ -->
51-
52-
<!-- ============= Begin NLog ================ -->
53-
54-
<!--
55-
<configSections>
56-
<section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog"/>
57-
</configSections>
58-
<system.diagnostics>
59-
<sources>
60-
<source name="ExcelDna.Integration" switchValue="Verbose">
61-
<listeners>
62-
<remove name="Default" />
63-
<add name="LogDisplay" type="ExcelDna.Logging.LogDisplayTraceListener,ExcelDna.Integration">
64-
<filter type="System.Diagnostics.EventTypeFilter" initializeData="Off"/>
65-
</add>
66-
<add name="NLogListener" type="NLog.NLogTraceListener,NLog" >
67-
<filter type="System.Diagnostics.EventTypeFilter" initializeData="All"/>
68-
</add>
69-
</listeners>
70-
</source>
71-
</sources>
72-
</system.diagnostics>
73-
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
74-
<targets>
75-
<target name="debugger" xsi:type="Debugger" layout="NLOG: ${longdate}|${level:uppercase=true}|${logger}[${event-properties:EventID}]|${message}"/>
76-
</targets>
77-
<rules>
78-
<logger name="*" minlevel="Warn" writeTo="debugger" />
79-
</rules>
80-
</nlog>
81-
-->
82-
83-
<!-- ============= End NLog ================ -->
84-
85-
<!-- ============= Start ExplicitDefaults ============ -->
86-
<!--
87-
This part of the sample has a configuration that is equivalent to the default configuration (when there are no entries in the .config file.
88-
This is a good start for customization of the levels or adding trace listeners.
89-
90-
By default the TraceSource is configured to source only Warning, Error and Fatal.
91-
the configuration can override this by setting switchValue attribute of the source tag (or create an explicit SourceSwitch).
92-
switchValue is a SourceLevel: Off, Critical, Error, Warning (default), Information, Verbose, All
93-
The DefaultTraceListener is automatically added to all TraceSources. It will write messages to the Debug output (if a debugger is attached to Excel).
94-
The DefaultTraceListener can be removed with a <remove name="Default"> tag in the <listeners> subtree.
95-
Excel-DNA adds the LogDisplayTraceListener to the TraceSource. By default, only Warning and Error messages are written to the LogDisplay,
96-
and the LogDisplay window is only shown if at least one Error message is written.
97-
The level of messages written to the LogDisplay can be adjusted by explicitly adding a "LogDisplay" listener of the relevant type,
98-
and setting the listener's filter to an EventTypeFilter with the correct setting.
99-
The EventTypeFiler's initializeData attribute is again a SourceLevel, i.e. one of: Off, Critical, Error, Warning (default), Information, Verbose, All.
100-
We use this filter to disable the LogDisplay completely - just set the filter to initializeData="Off".
101-
-->
102-
103-
<!--
104-
<system.diagnostics>
105-
<sources>
106-
<source name="ExcelDna.Integration" switchValue="Warning">
107-
<listeners>
108-
<add name="LogDisplay" type="ExcelDna.Logging.LogDisplayTraceListener,ExcelDna.Integration">
109-
<filter type="System.Diagnostics.EventTypeFilter" initializeData="All"/>
110-
</add>
111-
</listeners>
112-
</source>
113-
</sources>
114-
</system.diagnostics>
115-
-->
116-
117-
<!-- ============= End ExplicitDefaults ============ -->
118-
119-
<!-- ============== Start DisableLogging ============= -->
120-
<!-- This sample configuration disables all logging -->
121-
122-
<!--
123-
<system.diagnostics>
124-
<sources>
125-
<source name="ExcelDna.Integration" switchValue="Off">
126-
</source>
127-
</sources>
128-
</system.diagnostics>
129-
-->
130-
131-
<!-- ============== End DisableLogging ============= -->
132-
133-
<!-- ============== Start VerboseLogging ============= -->
134-
<!-- This sample configuration disables all logging -->
135-
136-
<!--
137-
<system.diagnostics>
138-
<sources>
139-
<source name="ExcelDna.Integration" switchValue="All">
140-
</source>
141-
</sources>
142-
</system.diagnostics>
143-
-->
144-
<!-- ============== End VerboseLogging ============= -->
145-
146-
<!-- =============== Start FileLogging ============== -->
147-
<!-- The initializeData attribute of the TextWriterTraceListener indicates the file path, either absolute or relative to the .xll.config file directory -->
148-
149-
<system.diagnostics>
150-
<trace autoflush="false" indentsize="4"/>
151-
<sources>
152-
<source name="ExcelDna.IntelliSense" switchValue="All">
153-
<listeners>
154-
<!--<remove name="Default" />-->
155-
<!--<add name="LogDisplay" type="ExcelDna.Logging.LogDisplayTraceListener,ExcelDna.Integration">
156-
<filter type="System.Diagnostics.EventTypeFilter" initializeData="All"/>
157-
</add>-->
158-
</listeners>
159-
</source>
160-
</sources>
161-
</system.diagnostics>
162-
163-
<!-- =============== End FileLogging ============== -->
164-
1659
</configuration>

0 commit comments

Comments
 (0)