~ifolder-dev/simias/trunk-packaging

« back to all changes in this revision

Viewing changes to external/log4net/doc/manual/.svn/text-base/framework-support.html.svn-base

  • Committer: Jorge O. Castro
  • Date: 2007-12-03 06:56:46 UTC
  • Revision ID: jorge@ubuntu.com-20071203065646-mupcnjcwgm5mnhyt
* Remove a bunch of .svn directories we no longer need.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?xml version="1.0" encoding="UTF-8" ?>
2
 
<!DOCTYPE html PUBLIC "-//w3c//dtd xhtml 1.1 strict//en" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3
 
<html xmlns="http://www.w3.org/1999/xhtml">
4
 
        <head>
5
 
                <link href="style.css" type="text/css" rel="STYLESHEET" />
6
 
                <title>log4net - Framework Support</title>
7
 
        </head>
8
 
        <body>
9
 
                <div id="header"><h1>log4net - Framework Support</h1>
10
 
                </div>
11
 
                <div id="content">
12
 
                        <h2>Summary of .NET frameworks supported by log4net</h2>
13
 
                        <div class="i1">
14
 
                                <p>
15
 
                                        log4net now builds on 5 frameworks:
16
 
                                </p>
17
 
                                <div class="table">
18
 
                                        <table cellspacing="0">
19
 
                                                <colgroup>
20
 
                                                        <col style="text-align: left; white-space: nowrap" />
21
 
                                                        <col style="text-align: left;" />
22
 
                                                </colgroup>
23
 
                                                <tr>
24
 
                                                        <th>
25
 
                                                                Framework</th>
26
 
                                                        <th>
27
 
                                                                Website</th>
28
 
                                                </tr>
29
 
                                                <tr style="vertical-align: top;">
30
 
                                                        <td>Microsoft .Net Framework 1.0 (1.0.3705)</td>
31
 
                                                        <td><a href="http://msdn.microsoft.com/net">http://msdn.microsoft.com/net</a></td>
32
 
                                                </tr>
33
 
                                                <tr style="vertical-align: top;">
34
 
                                                        <td>Microsoft .Net Framework 1.1 (1.1.4322)</td>
35
 
                                                        <td><a href="http://msdn.microsoft.com/net">http://msdn.microsoft.com/net</a></td>
36
 
                                                </tr>
37
 
                                                <tr style="vertical-align: top;">
38
 
                                                        <td>Microsoft .Net Compact Framework 1.0 (1.0.5000)</td>
39
 
                                                        <td><a href="http://msdn.microsoft.com/vstudio/device/compactfx.asp">http://msdn.microsoft.com/vstudio/device/compactfx.asp</a></td>
40
 
                                                </tr>
41
 
                                                <tr style="vertical-align: top;">
42
 
                                                        <td>Mono 0.25 or higher</td>
43
 
                                                        <td><a href="http://www.go-mono.org">http://www.go-mono.org</a></td>
44
 
                                                </tr>
45
 
                                                <tr style="vertical-align: top;">
46
 
                                                        <td>Microsoft Shared Source CLI 1.0</td>
47
 
                                                        <td><a href="http://msdn.microsoft.com/library/en-us/dndotnet/html/mssharsourcecli.asp">http://msdn.microsoft.com/library/en-us/dndotnet/html/mssharsourcecli.asp</a></td>
48
 
                                                </tr>
49
 
                                        </table>
50
 
                                </div>
51
 
                                <p>
52
 
                                        For each of these frameworks, an assembly targeting that the framework is supplied.  Although it's 
53
 
                                        perfectly possible to use the .NET Framework 1.0 version of log4net on the .NET Framework 1.1, having 
54
 
                                        an assembly that really targets a specific framework allows us to use features in that framework that 
55
 
                                        are not available in other frameworks or remove features from log4net that are not supported in a 
56
 
                                        specific framework.
57
 
                                </p>
58
 
                        </div>
59
 
                        <h2>Appenders</h2>
60
 
                        <div class="i1">
61
 
                                <p>
62
 
                                        The appenders available to each framework depend on the functionality of the 
63
 
                                        framework and the platform it runs on:
64
 
                                </p>
65
 
                                <div class="table">
66
 
                                        <table cellspacing="0">
67
 
                                                <colgroup>
68
 
                                                        <col style="text-align: left;" />
69
 
                                                        <col style="text-align: center;" />
70
 
                                                        <col style="text-align: center;" />
71
 
                                                        <col style="text-align: center;" />
72
 
                                                        <col style="text-align: center;" />
73
 
                                                        <col style="text-align: center;" />
74
 
                                                </colgroup>
75
 
                                                <tr>
76
 
                                                        <th>
77
 
                                                                Appender</th>
78
 
                                                        <th>
79
 
                                                                .NET Framework 1.0</th>
80
 
                                                        <th>
81
 
                                                                .NET Framework 1.1</th>
82
 
                                                        <th>
83
 
                                                                .NET Compact Framework 1.0</th>
84
 
                                                        <th>
85
 
                                                                Mono 0.25 or higher</th>
86
 
                                                        <th>
87
 
                                                                Shared Source CLI 1.0</th>
88
 
                                                </tr>
89
 
                                                <tr>
90
 
                                                        <td>ADONetAppender</td>
91
 
                                                        <td>x</td>
92
 
                                                        <td>x</td>
93
 
                                                        <td>x</td>
94
 
                                                        <td>x</td>
95
 
                                                        <td></td>
96
 
                                                </tr>
97
 
                                                <tr>
98
 
                                                        <td>ASPNetTraceAppender</td>
99
 
                                                        <td>x</td>
100
 
                                                        <td>x</td>
101
 
                                                        <td></td>
102
 
                                                        <td>x</td>
103
 
                                                        <td></td>
104
 
                                                </tr>
105
 
                                                <tr>
106
 
                                                        <td>BufferingForwardingAppender</td>
107
 
                                                        <td>x</td>
108
 
                                                        <td>x</td>
109
 
                                                        <td>x</td>
110
 
                                                        <td>x</td>
111
 
                                                        <td>x</td>
112
 
                                                </tr>
113
 
                                                <tr>
114
 
                                                        <td>ColoredConsoleAppender</td>
115
 
                                                        <td>x</td>
116
 
                                                        <td>x</td>
117
 
                                                        <td></td>
118
 
                                                        <td></td>
119
 
                                                        <td></td>
120
 
                                                </tr>
121
 
                                                <tr>
122
 
                                                        <td>ConsoleAppender</td>
123
 
                                                        <td>x</td>
124
 
                                                        <td>x</td>
125
 
                                                        <td>x</td>
126
 
                                                        <td>x</td>
127
 
                                                        <td>x</td>
128
 
                                                </tr>
129
 
                                                <tr>
130
 
                                                        <td>CountingAppender</td>
131
 
                                                        <td>x</td>
132
 
                                                        <td>x</td>
133
 
                                                        <td>x</td>
134
 
                                                        <td>x</td>
135
 
                                                        <td>x</td>
136
 
                                                </tr>
137
 
                                                <tr>
138
 
                                                        <td>EventLogAppender</td>
139
 
                                                        <td>x</td>
140
 
                                                        <td>x</td>
141
 
                                                        <td></td>
142
 
                                                        <td></td>
143
 
                                                        <td></td>
144
 
                                                </tr>
145
 
                                                <tr>
146
 
                                                        <td>FileAppender</td>
147
 
                                                        <td>x</td>
148
 
                                                        <td>x</td>
149
 
                                                        <td>x</td>
150
 
                                                        <td>x</td>
151
 
                                                        <td>x</td>
152
 
                                                </tr>
153
 
                                                <tr>
154
 
                                                        <td>ForwardingAppender</td>
155
 
                                                        <td>x</td>
156
 
                                                        <td>x</td>
157
 
                                                        <td>x</td>
158
 
                                                        <td>x</td>
159
 
                                                        <td>x</td>
160
 
                                                </tr>
161
 
                                                <tr>
162
 
                                                        <td>MemoryAppender</td>
163
 
                                                        <td>x</td>
164
 
                                                        <td>x</td>
165
 
                                                        <td>x</td>
166
 
                                                        <td>x</td>
167
 
                                                        <td>x</td>
168
 
                                                </tr>
169
 
                                                <tr>
170
 
                                                        <td>NetSendAppender</td>
171
 
                                                        <td>x</td>
172
 
                                                        <td>x</td>
173
 
                                                        <td></td>
174
 
                                                        <td></td>
175
 
                                                        <td></td>
176
 
                                                </tr>
177
 
                                                <tr>
178
 
                                                        <td>OutputDebugStringAppender</td>
179
 
                                                        <td>x</td>
180
 
                                                        <td>x</td>
181
 
                                                        <td>x</td>
182
 
                                                        <td></td>
183
 
                                                        <td></td>
184
 
                                                </tr>
185
 
                                                <tr>
186
 
                                                        <td>RemotingAppender</td>
187
 
                                                        <td>x</td>
188
 
                                                        <td>x</td>
189
 
                                                        <td></td>
190
 
                                                        <td>x</td>
191
 
                                                        <td>x</td>
192
 
                                                </tr>
193
 
                                                <tr>
194
 
                                                        <td>RollingFileAppender</td>
195
 
                                                        <td>x</td>
196
 
                                                        <td>x</td>
197
 
                                                        <td>x</td>
198
 
                                                        <td>x</td>
199
 
                                                        <td>x</td>
200
 
                                                </tr>
201
 
                                                <tr>
202
 
                                                        <td>SMTPAppender</td>
203
 
                                                        <td>x</td>
204
 
                                                        <td>x</td>
205
 
                                                        <td></td>
206
 
                                                        <td>x</td>
207
 
                                                        <td></td>
208
 
                                                </tr>
209
 
                                                <tr>
210
 
                                                        <td>SmtpPickupDirAppender</td>
211
 
                                                        <td>x</td>
212
 
                                                        <td>x</td>
213
 
                                                        <td>x</td>
214
 
                                                        <td>x</td>
215
 
                                                        <td>x</td>
216
 
                                                </tr>
217
 
                                                <tr>
218
 
                                                        <td>TraceAppender</td>
219
 
                                                        <td>x</td>
220
 
                                                        <td>x</td>
221
 
                                                        <td>x</td>
222
 
                                                        <td>x</td>
223
 
                                                        <td>x</td>
224
 
                                                </tr>
225
 
                                                <tr>
226
 
                                                        <td>UdpAppender</td>
227
 
                                                        <td>x</td>
228
 
                                                        <td>x</td>
229
 
                                                        <td>x</td>
230
 
                                                        <td>x</td>
231
 
                                                        <td>x</td>
232
 
                                                </tr>
233
 
                                        </table>
234
 
                                </div>
235
 
                        </div>
236
 
                        <h2>Framework Specific Notes</h2>
237
 
                        <div class="i1">
238
 
                                <h3>Microsoft .Net Framework 1.0 (1.0.3705)</h3>
239
 
                                <div class="i1">
240
 
                                        <p>
241
 
                                                none
242
 
                                        </p>
243
 
                                </div>
244
 
                                <h3>Microsoft .Net Framework 1.1 (1.1.4322)</h3>
245
 
                                <div class="i1">
246
 
                                        <p>
247
 
                                                none
248
 
                                        </p>
249
 
                                </div>
250
 
                                <h3>Microsoft .Net Compact Framework 1.0 (1.0.5000)</h3>
251
 
                                <div class="i1">
252
 
                                        <ul>
253
 
                                                <li>
254
 
                                                        <h4>Assembly attributes</h4>
255
 
                                                        <p>
256
 
                                                                The .NET Compact Framework 1.0 does not support retrieving assembly-level 
257
 
                                                                attributes, therefore all log4net configuration attributes were removed from 
258
 
                                                                the .NET Compact Framework 1.0 version of log4net.
259
 
                                                        </p>
260
 
                                                        <p>
261
 
                                                                For Smart-device applications, the log4net system can be configured by passing 
262
 
                                                                the location of the log4net configuration file to the
263
 
                                                                <span class="code">log4net.Config.DOMConfigurator.Configure(FileInfo)</span>
264
 
                                                                method in the entry point of the application.
265
 
                                                        </p>
266
 
                                                        <p>For example:</p>
267
 
                                                        <p />
268
 
                                                        <pre class="code">
269
 
namespace TestApp
270
 
{
271
 
        using System.IO;
272
 
 
273
 
        public class EntryPoint
274
 
        {
275
 
                /// &lt;summary&gt;
276
 
                /// Application entry point.
277
 
                /// &lt;/summary&gt;
278
 
                public static void Main() 
279
 
                {
280
 
                        // Uncomment the next line to enable log4net internal debugging
281
 
                        // log4net.helpers.LogLog.InternalDebugging = true;
282
 
 
283
 
                        // This will instruct log4net to look for a configuration file
284
 
                        // called config.log4net in the root directory of the device
285
 
                        log4net.Config.DOMConfigurator.Configure(new FileInfo(@"\config.log4net"));
286
 
 
287
 
                        ...
288
 
                        
289
 
                        // This will shutdown the log4net system
290
 
                        log4net.LogManager.Shutdown();
291
 
                }
292
 
        }
293
 
}                                               
294
 
                                                        </pre>
295
 
                                                </li>
296
 
                                                <li>
297
 
                                                        <h4>Notification events</h4>
298
 
                                                        <p>
299
 
                                                                The .NET Compact Framework 1.0 does not support notification events during the 
300
 
                                                                application shutdown, therefore log4net cannot automatically hook the 
301
 
                                                                application shutdown notification.
302
 
                                                        </p>
303
 
                                                        <p>
304
 
                                                                Applications will need to programmatically shutdown the log4net system during 
305
 
                                                                the application's shutdown using the
306
 
                                                                <span class="code">log4net.LogManager.Shutdown()</span>
307
 
                                                                method in order to prevent losing logging events.
308
 
                                                                See the code above for an example.
309
 
                                                        </p>
310
 
                                                </li>
311
 
                                                <li>
312
 
                                                        <h4>FileSystemWatcher</h4>
313
 
                                                        <p>
314
 
                                                                The .NET Compact Framework 1.0 does not support the
315
 
                                                                <span class="code">System.IO.FileSystemWatcher</span>
316
 
                                                                class. As a result, the
317
 
                                                                <span class="code">DOMConfiguratorAttribute.Watch</span>
318
 
                                                                property and the 
319
 
                                                                <span class="code">DOMConfigurator.ConfigureAndWatch</span>
320
 
                                                                methods are not available. Watching changes to the log4net configuration 
321
 
                                                                file is not supported on the .NET Compact Framework 1.0.
322
 
                                                        </p>
323
 
                                                </li>
324
 
                                                <li>
325
 
                                                        <h4>UserName</h4>
326
 
                                                        <p>
327
 
                                                                The .NET Compact Framework 1.0 does not support the
328
 
                                                                <span class="code">System.Security.Principal.WindowsIdentity</span> class.
329
 
                                                                This is used to capture the current thread's user identity. Therefore
330
 
                                                                the <span class="code">LoggingEvent.UserName</span> property will return the value 
331
 
                                                                <span class="code">"NOT AVAILABLE"</span>.
332
 
                                                        </p>
333
 
                                                </li>
334
 
                                                <li>
335
 
                                                        <h4>Identity</h4>
336
 
                                                        <p>
337
 
                                                                The .NET Compact Framework 1.0 does not support the
338
 
                                                                <span class="code">System.Security.Principal.IPrincipal</span> interface.
339
 
                                                                This is used to capture the current thread's user identity. Therefore
340
 
                                                                the <span class="code">LoggingEvent.Identity</span> property will return the value 
341
 
                                                                <span class="code">"NOT AVAILABLE"</span>.
342
 
                                                        </p>
343
 
                                                </li>
344
 
                                                <li>
345
 
                                                        <h4>Environment variables</h4>
346
 
                                                        <p>
347
 
                                                                The .NET Compact Framework 1.0 does not support retrieving environment 
348
 
                                                                variables, therefore it's not possible to substitute environment variables in 
349
 
                                                                parameter values when using the .NET Compact Framework 1.0 version of log4net.
350
 
                                                        </p>
351
 
                                                </li>
352
 
                                                <li>
353
 
                                                        <h4>Serialization</h4>
354
 
                                                        <p>
355
 
                                                                The .NET Compact Framework 1.0 does not support serialization, therefore none of 
356
 
                                                                the log4net classes in the .NET Compact Framework 1.0 version are serializable.
357
 
                                                        </p>
358
 
                                                </li>
359
 
                                                <li>
360
 
                                                        <h4>LoggingEvent.Domain</h4>
361
 
                                                        <p>
362
 
                                                                The .NET Compact Framework 1.0 does not support AppDomain functionality. The
363
 
                                                                friendly name for the current AppDomain is stored in the <span class="code">LoggingEvent.Domain</span>
364
 
                                                                property and is accessed using the <span class="code">%a</span> pattern of the 
365
 
                                                                <span class="code">PatternLayout</span>. On the .NET Compact Framework 1.0 this
366
 
                                                                value is generated by taking the file name for the application's primary module.
367
 
                                                        </p>
368
 
                                                </li>
369
 
                                        </ul>
370
 
                                </div>
371
 
                                <h3>Mono 0.25 or higher</h3>
372
 
                                <div class="i1">
373
 
                                        <p>
374
 
                                                none
375
 
                                        </p>
376
 
                                </div>
377
 
                                <h3>Microsoft Shared Source CLI 1.0</h3>
378
 
                                <div class="i1">
379
 
                                        <ul>
380
 
                                                <li>
381
 
                                                        <h4>FileSystemWatcher</h4>
382
 
                                                        <p>
383
 
                                                                SSCLI 1.0 does not support the
384
 
                                                                <span class="code">System.IO.FileSystemWatcher</span>
385
 
                                                                class. As a result, the
386
 
                                                                <span class="code">DOMConfiguratorAttribute.Watch</span>
387
 
                                                                property and the 
388
 
                                                                <span class="code">DOMConfigurator.ConfigureAndWatch</span>
389
 
                                                                methods are not available. Watching changes to the log4net configuration 
390
 
                                                                file is not supported on SSCLI 1.0.
391
 
                                                        </p>
392
 
                                                </li>
393
 
                                                <li>
394
 
                                                        <h4>UserName</h4>
395
 
                                                        <p>
396
 
                                                                SSCLI 1.0 does not support the
397
 
                                                                <span class="code">System.Security.Principal.WindowsIdentity</span> class.
398
 
                                                                This is used to capture the current thread's user identity. Therefore
399
 
                                                                the <span class="code">LoggingEvent.UserName</span> property will return the value 
400
 
                                                                <span class="code">"NOT AVAILABLE"</span>.
401
 
                                                        </p>
402
 
                                                </li>
403
 
                                                <li>
404
 
                                                        <h4>Identity</h4>
405
 
                                                        <p>
406
 
                                                                SSCLI 1.0 does not support the
407
 
                                                                <span class="code">System.Security.Principal.IPrincipal</span> interface.
408
 
                                                                This is used to capture the current thread's user identity. Therefore
409
 
                                                                the <span class="code">LoggingEvent.Identity</span> property will return the value 
410
 
                                                                <span class="code">"NOT AVAILABLE"</span>.
411
 
                                                        </p>
412
 
                                                </li>
413
 
                                        </ul>
414
 
                                </div>
415
 
                        </div>
416
 
                </div>
417
 
                <div id="footer">Copyright (C) 2001-2003 Neoworks Limited. All Rights Reserved.</div>
418
 
        </body>
419
 
</html>