This repository has been archived by the owner on Sep 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
eventbrokerlogging.html
61 lines (59 loc) · 2.14 KB
/
eventbrokerlogging.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
---
layout: documentation
title: EventBroker
teaser: Decoupled eventing with automatic thread switching
navigation:
- name: Overview
link: eventbroker.html
- name: Tutorial
link: eventbrokertutorial.html
- name: Registration by Attribute
link: eventbrokerregistrationbyattribute.html
- name: Registration over Interface
link: eventbrokerregistrationoverinterface.html
- name: Registration by Registrar
link: eventbrokerregistrationbyregistrar.html
- name: Simplified Handler Methods
link: eventbrokersimplifiedhandlermethods.html
- name: Direct Interaction
link: eventbrokerdirectinteraction.html
- name: Handlers
link: eventbrokerhandlers.html
- name: Matchers
link: eventbrokermatchers.html
- name: Exception Handling
link: eventbrokerexceptionhandling.html
- name: Extensions
link: eventbrokerextensions.html
- name: Logging
link: eventbrokerlogging.html
- name: Testability
link: eventbrokertestability.html
- name: Tips and Tricks
link: eventbrokertipsandtricks.html
- name: Specifications
link: eventbrokerspecifications.html
---
<h2>Logging</h2>
<p>
There exists a log4net extension that provides logging using log4net.
Please, download the nuget package Appccelerate.SourceTemplates to get the sample code.
You can either take the source as is, or change it so it meets your logging requirements.
</p>
<p>
You can add an instance of the Appccelerate.Log4Net.EventbrokerLogExtension to the event broker:
</p>
<script type="syntaxhighlighter" class="brush: csharp"><![CDATA[
eventBroker.AddExtension(new Log4Net.EventBrokerLogExtension());
]]></script>
<p>
You can define the logger that log4net uses by specifing the name in the constructor:
</p>
<script type="syntaxhighlighter" class="brush: csharp"><![CDATA[
eventBroker.AddExtension(new Log4Net.EventBrokerLogExtension("my.logger.name"));
]]></script>
<h3>Custom Logging</h3>
<p>
If you want to change either the logging framework or what and how is logged then you can write your own logging extension.
See <a href="eventbrokerextensions.html">extensions</a> on how to implement an extension.
</p>