1: <?xml version="1.0" encoding="utf-8"?>
2: <configuration>
3: <configSections>
4: <section name="policyInjection" type="Microsoft.Practices.EnterpriseLibrary.PolicyInjection.Configuration.PolicyInjectionSettings, Microsoft.Practices.EnterpriseLibrary.PolicyInjection, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
5: <section name="loggingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings, Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
6: </configSections>
7: <policyInjection>
8: <policies>
9: <add name="Policy">
10: <matchingRules>
11: <add type="Microsoft.Practices.EnterpriseLibrary.PolicyInjection.MatchingRules.MemberNameMatchingRule, Microsoft.Practices.EnterpriseLibrary.PolicyInjection, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
12: name="Member Name Matching Rule">
13: <matches>
14: <add match="Echo" ignoreCase="false" />
15: </matches>
16: </add>
17: <add type="Microsoft.Practices.EnterpriseLibrary.PolicyInjection.MatchingRules.TypeMatchingRule, Microsoft.Practices.EnterpriseLibrary.PolicyInjection, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
18: name="Type Matching Rule">
19: <matches>
20: <add match="EchoService" ignoreCase="false" />
21: </matches>
22: </add>
23: </matchingRules>
24: <handlers>
25: <add logBehavior="BeforeAndAfter" beforeMessage="Before Echo"
26: afterMessage="After Echo" eventId="52" includeParameterValues="true"
27: includeCallStack="false" includeCallTime="true" priority="-1"
28: severity="Information" type="Microsoft.Practices.EnterpriseLibrary.PolicyInjection.CallHandlers.LogCallHandler, Microsoft.Practices.EnterpriseLibrary.PolicyInjection.CallHandlers, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
29: name="Logging Handler">
30: <categories>
31: <add name="General" />
32: </categories>
33: </add>
34: </handlers>
35: </add>
36: </policies>
37: </policyInjection>
38: <loggingConfiguration name="Logging Application Block" tracingEnabled="true"
39: defaultCategory="General" logWarningsWhenNoCategoriesMatch="true">
40: <listeners>
41: <add source="Enterprise Library Logging" formatter="Text Formatter"
42: log="Application" machineName="" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FormattedEventLogTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
43: traceOutputOptions="None" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FormattedEventLogTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
44: name="Formatted EventLog TraceListener" />
45: </listeners>
46: <formatters>
47: <add template="Timestamp: {timestamp}
Message: {message}
Category: {category}
Priority: {priority}
EventId: {eventid}
Severity: {severity}
Title:{title}
Machine: {machine}
Application Domain: {appDomain}
Process Id: {processId}
Process Name: {processName}
Win32 Thread Id: {win32ThreadId}
Thread Name: {threadName}
Extended Properties: {dictionary({key} - {value}
)}" 48: type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
49: name="Text Formatter" />
50: </formatters>
51: <categorySources>
52: <add switchValue="All" name="General">
53: <listeners>
54: <add name="Formatted EventLog TraceListener" />
55: </listeners>
56: </add>
57: </categorySources>
58: <specialSources>
59: <allEvents switchValue="All" name="All Events" />
60: <notProcessed switchValue="All" name="Unprocessed Category" />
61: <errors switchValue="All" name="Logging Errors & Warnings">
62: <listeners>
63: <add name="Formatted EventLog TraceListener" />
64: </listeners>
65: </errors>
66: </specialSources>
67: </loggingConfiguration>
68: </configuration>