File: log4net.Layout.XmlLayout.html

package info (click to toggle)
log4net 1.2.10%2Bdfsg-6
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 16,716 kB
  • ctags: 3,590
  • sloc: cs: 25,174; xml: 8,133; cpp: 91; makefile: 57; ansic: 7
file content (58 lines) | stat: -rw-r--r-- 3,959 bytes parent folder | download | duplicates (6)
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
<html dir="LTR">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=Windows-1252" />
    <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5" />
    <title>XmlLayout Class</title>
    <xml>
    </xml>
    <link rel="stylesheet" type="text/css" href="MSDN.css" />
  </head>
  <body id="bodyID" class="dtBODY">
    <div id="nsbanner">
      <div id="bannerrow1">
        <table class="bannerparthead" cellspacing="0">
          <tr id="hdr">
            <td class="runninghead">log4net SDK Reference</td>
            <td class="product">
            </td>
          </tr>
        </table>
      </div>
      <div id="TitleRow">
        <h1 class="dtH1">XmlLayout Class</h1>
      </div>
    </div>
    <div id="nstext">
      <p> Layout that formats the log events as XML elements. </p>
      <p>For a list of all members of this type, see <a href="log4net.Layout.XmlLayoutMembers.html">XmlLayout Members</a>.</p>
      <p>
        <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemObjectClassTopic.asp">System.Object</a>
        <br /><a href="log4net.Layout.LayoutSkeleton.html">log4net.Layout.LayoutSkeleton</a><br /><a href="log4net.Layout.XmlLayoutBase.html">log4net.Layout.XmlLayoutBase</a><br /><b>log4net.Layout.XmlLayout</b></p>
      <div class="syntax">
        <span class="lang">[VisualBasic]</span>
        <br />PublicClassXmlLayout<div>Inherits<a href="log4net.Layout.XmlLayoutBase.html">XmlLayoutBase</a></div></div>
      <div class="syntax">
        <span class="lang">[C#]</span>
        <div>publicclassXmlLayout<b> : <a href="log4net.Layout.XmlLayoutBase.html">XmlLayoutBase</a></b></div>
      </div>
      <H4 class="dtH4">Thread Safety</H4>
      <P>This type is <b>not</b> safe for multithreaded operations.</P>
      <h4 class="dtH4">Remarks</h4>
            <p> The output of the <b>XmlLayout</b> consists of a series of log4net:event elements. It does not output a complete well-formed XML file. The output is designed to be included as an <em>external entity</em> in a separate file to form a correct XML file. </p>
            <p> For example, if <code>abc</code> is the name of the file where the <b>XmlLayout</b> output goes, then a well-formed XML file would be: </p>
            <pre class="code"><span class="lang">[XML]
</span>&lt;?xml version="1.0" ?&gt;

&lt;!DOCTYPE log4net:events SYSTEM "log4net-events.dtd" [&lt;!ENTITY data SYSTEM "abc"&gt;]&gt;

&lt;log4net:events version="1.2" xmlns:log4net="http://logging.apache.org/log4net/schemas/log4net-events-1.2&gt;
    &amp;data;
&lt;/log4net:events&gt;
</pre>
            <p> This approach enforces the independence of the <b>XmlLayout</b> and the appender where it is embedded. </p>
            <p> The <code>version</code> attribute helps components to correctly interpret output generated by <b>XmlLayout</b>. The value of this attribute should be "1.2" for release 1.2 and later. </p>
            <p> Alternatively the <code>Header</code> and <code>Footer</code> properties can be configured to output the correct XML header, open tag and close tag. When setting the <code>Header</code> and <code>Footer</code> properties it is essential that the underlying data store not be appendable otherwise the data will become invalid XML. </p>
            <h4 class="dtH4">Requirements</h4><p><b>Namespace: </b><a href="log4net.Layout.html">log4net.Layout</a></p><p><b>Assembly: </b>log4net (in log4net.dll)
					</p><h4 class="dtH4">See Also</h4><p><a href="log4net.Layout.XmlLayoutMembers.html">XmlLayout Members</a> | <a href="log4net.Layout.html">log4net.Layout Namespace</a></p><hr /><div id="footer"><p><a href="http://logging.apache.org/log4net">Copyright 2001-2006 The Apache Software Foundation.</a></p><p>Generated from assembly log4net [1.2.10.0]</p></div></div>
  </body>
</html>