PageRenderTime 54ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 0ms

/lang/dotnet/src/contrib/log4net-1.2.10/doc/release/manual/repositories.html

https://github.com/thirumg/Avro.NET
HTML | 262 lines | 183 code | 50 blank | 29 comment | 0 complexity | 836c30fdfd18981f6d203d2ef28b09f1 MD5 | raw file
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <!--
  3. Copyright 2004-2006 The Apache Software Foundation
  4. Licensed under the Apache License, Version 2.0 (the "License");
  5. you may not use this file except in compliance with the License.
  6. You may obtain a copy of the License at
  7. http://www.apache.org/licenses/LICENSE-2.0
  8. Unless required by applicable law or agreed to in writing, software
  9. distributed under the License is distributed on an "AS IS" BASIS,
  10. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. See the License for the specific language governing permissions and
  12. limitations under the License.
  13. -->
  14. <!-- Content Stylesheet for Site -->
  15. <!-- start the processing -->
  16. <!-- ====================================================================== -->
  17. <!-- GENERATED FILE, DO NOT EDIT, EDIT THE XML FILE IN xdocs INSTEAD! -->
  18. <!-- Main Page Section -->
  19. <!-- ====================================================================== -->
  20. <html>
  21. <head>
  22. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
  23. <meta name="author" value="Nicko Cadell">
  24. <meta name="email" value="nicko at apache dot org">
  25. <meta name="keywords" content="building log4net, log4net" />
  26. <link href="../../css/site.css" rel="stylesheet" type="text/css"/>
  27. <link href="../../css/style.css" rel="stylesheet" type="text/css"/>
  28. <title>log4net - log4net Manual - Repositories</title>
  29. </head>
  30. <body
  31. bgcolor="#ffffff"
  32. text="#000000"
  33. link="#525D76"
  34. >
  35. <!-- START Header table -->
  36. <table class="banner" border="0">
  37. <tr>
  38. <td valign="top">
  39. <a href="http://logging.apache.org/">
  40. <img src="http://logging.apache.org/images/ls-logo.jpg" border="0"/>
  41. </a>
  42. </td>
  43. <td align="right">
  44. </td>
  45. </tr>
  46. </table>
  47. <!-- END Header table -->
  48. <div class="centercol">
  49. <!-- START main table -->
  50. <h1><a id="main"></a>log4net Manual - Repositories</h1>
  51. <div class="i1">
  52. <h2>Contents</h2>
  53. <div class="i1">
  54. <a href="#repository">Logging Repositories</a><br/>
  55. <div class="i1">
  56. <a href="#attributes">Attributes</a><br/>
  57. <div class="i1">
  58. </div>
  59. </div>
  60. </div>
  61. <h2><a id="repository"></a>Logging Repositories</h2>
  62. <div class="i1">
  63. <p>
  64. Logging repositories are considered advanced functionality. The default behavior
  65. should be sufficient for most users.
  66. </p>
  67. <p>
  68. Log4net supports logging repositories. A repository is uniquely named.
  69. Each repository is a (<span class="code">ILoggerRepository</span>).
  70. Multiple assemblies can link to the same repository.
  71. </p>
  72. <p>
  73. By default there is a single logging repository per process (more precisely per AppDomain). This extends
  74. across all assemblies loaded into the process and allows them to all share a
  75. single configuration. The configuration of the repository only needs to be done once,
  76. typically in the entry point to the application, either programmatically or using
  77. a configuration attribute.
  78. </p>
  79. <p>
  80. Named logging repositories can be created using the <span class="code">LogManager.CreateRepository</span>
  81. method. The repository for can be retrieved using the
  82. <span class="code">LogManager.GetRepository</span> method.
  83. A repository created in this way will need to be configured programmatically.
  84. </p>
  85. <h3><a id="attributes"></a>Attributes</h3>
  86. <div class="i1">
  87. <p>
  88. An assembly may choose to utilize a named logging repository rather than the default repository.
  89. This completely separates the logging for the assembly from the rest of the application.
  90. This can be very useful to component developers that wish to use log4net for their
  91. components but do not want to require that all the applications that use their
  92. component are aware of log4net. It also means that their debugging configuration is
  93. separated from the applications configuration. The assembly should specify the
  94. <span class="code">RepositoryAttribute</span> to set its logging repository.
  95. </p>
  96. <p>
  97. The log4net logging repositories can be configured using the following assembly-level
  98. attributes:
  99. </p>
  100. <ul>
  101. <li>
  102. <b>AliasRepositoryAttribute</b>
  103. <p>
  104. Specifies a named repository to use as this assembly's repository.
  105. </p>
  106. <p>
  107. An assembly's logger repository is defined by its
  108. <span class="code">RepositoryAttribute</span>, however this can be overridden by an
  109. assembly loaded before the target assembly.
  110. </p>
  111. <p>
  112. An assembly can alias another assembly's repository by specifying
  113. this attribute with the name of the target repository.
  114. </p>
  115. <p>
  116. This attribute may be used as many times as necessary to alias all the required
  117. repositories.
  118. </p>
  119. </li>
  120. <li>
  121. <b>RepositoryAttribute</b>
  122. <p>
  123. Specifies the logging repository for the assembly.
  124. </p>
  125. <p>
  126. Assemblies are mapped to logging repositories. This attribute controls the configuration of the repository. The
  127. <span class="code">Name</span> property specifies the name of the repository
  128. for this assembly. The <span class="code">RepositoryType</span>
  129. property specifies the type of the repository object to create for the assembly.
  130. If this attribute is not specified and a <span class="code">Name</span>
  131. is not specified then the assembly will be part of the default shared logging
  132. repository.
  133. </p>
  134. <p>
  135. This attribute may only be used once per assembly.
  136. </p>
  137. </li>
  138. </ul>
  139. </div>
  140. </div>
  141. </div>
  142. <!-- FOOTER -->
  143. <p>&nbsp;</p>
  144. <div align="center"><font color="#525D76" size="-1"><em>
  145. Copyright &#169;
  146. 2004-2006,
  147. Apache Software Foundation
  148. </em></font></div>
  149. <!-- END main table -->
  150. </div>
  151. <!-- LEFT SIDE NAVIGATION -->
  152. <!-- ============================================================ -->
  153. <div class="leftcol">
  154. <div class="menu_header">Apache</div>
  155. <div class="menu_item"> <a href="http://www.apache.org">Apache Home</a>
  156. </div>
  157. <div class="menu_item"> <a href="http://logging.apache.org/">Logging Services</a>
  158. </div>
  159. <div class="menu_header">log4net Project</div>
  160. <div class="menu_item"> <a href="../../index.html">About</a>
  161. </div>
  162. <div class="menu_item"> <a href="../../license.html">License</a>
  163. </div>
  164. <div class="menu_item"> <a href="../../support.html">Support</a>
  165. </div>
  166. <div class="menu_item"> <a href="../../roadmap.html">Roadmap</a>
  167. </div>
  168. <div class="menu_item"> <a href="../../contributing.html">Contributing</a>
  169. </div>
  170. <div class="menu_item"> <a href="../../history.html">History</a>
  171. </div>
  172. <div class="menu_item"> <a href="../../downloads.html">Downloads</a>
  173. </div>
  174. <div class="menu_header">log4net 1.2 Documentation</div>
  175. <div class="menu_item"> <a href="../../release/features.html">Features</a>
  176. </div>
  177. <div class="menu_item"> <a href="../../release/framework-support.html">Supported Frameworks</a>
  178. </div>
  179. <div class="menu_item"> <a href="../../release/release-notes.html">Release Notes</a>
  180. </div>
  181. <div class="menu_item"> <a href="../../release/example-apps.html">Example Apps</a>
  182. </div>
  183. <div class="menu_item"> <a href="../../release/config-examples.html">Config Examples</a>
  184. </div>
  185. <div class="menu_item"> <a href="../../release/building.html">Building</a>
  186. </div>
  187. <div class="menu_item"> <a href="../../release/faq.html">FAQ</a>
  188. </div>
  189. <div class="menu_item"> <a href="../../release/howto/index.html">How Tos</a>
  190. </div>
  191. <div class="menu_item"> <a href="../../release/sdk/index.html">SDK Reference</a>
  192. </div>
  193. <div class="menu_header">log4net 1.2 Manual</div>
  194. <div class="menu_item"> <a href="../../release/manual/introduction.html">Introduction</a>
  195. </div>
  196. <div class="menu_item"> <a href="../../release/manual/configuration.html">Configuration</a>
  197. </div>
  198. <div class="menu_item"> <a href="../../release/manual/contexts.html">Contexts</a>
  199. </div>
  200. <div class="menu_item"> <a href="../../release/manual/plugins.html">Plugins</a>
  201. </div>
  202. <div class="menu_item"> <a href="../../release/manual/repositories.html">Repositories</a>
  203. </div>
  204. <div class="menu_item"> <a href="../../release/manual/internals.html">Internals</a>
  205. </div>
  206. </div>
  207. </body>
  208. </html>
  209. <!-- end the processing -->