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
/
Copy pathevaluationenginelogging.html
58 lines (58 loc) · 2.02 KB
/
evaluationenginelogging.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
---
layout: documentation
title: EvaluationEngine
teaser: Decouple business logic from control flow
navigation:
- name: Overview
link: evaluationengine.html
- name: Tutorial
link: evaluationenginetutorial.html
- name: Modules
link: evaluationenginemodules.html
- name: Hierarchical Evaluation Engines
link: evaluationenginehierarchies.html
- name: Aggregators
link: evaluationengineaggregators.html
- name: Expressions
link: evaluationengineexpressions.html
- name: Strategies
link: evaluationenginestrategies.html
- name: Validation
link: evaluationenginevalidation.html
- name: Logging
link: evaluationenginelogging.html
- name: Tips and Tricks
link: evaluationenginetipsandtricks.html
- name: Specifications
link: evaluationenginespecifications.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 set the log extension on the evaluation engine:
</p>
<script type="syntaxhighlighter" class="brush: csharp"><![CDATA[
evaluationEngine.SetLogExtension(new Log4Net.EvaluationEngineLogExtension());
]]></script>
<p>
This logs messages like the following:
</p>
<script type="syntaxhighlighter" class="brush: plain"><![CDATA[
INFO - Question = how cool is the evaluation engine?
Answer = extremely super fantastic
Used strategy = aggregator strategy
Used Aggregator = expression aggregator
with seed ''
and aggregate function (aggregate, value) => ((aggregate + " ") + value)
Expressions =
inline expression = (q, p) => "extremely" => extremely
inline expression = (q, p) => "super" => super
inline expression = (q, p) => "fantastic" => fantastic
]]></script>
<p>
You can see which strategy, aggregator and expressions were used. And what the individual expressions returned as results and what the answer was.
</p>