log4r 1.1.6 → 1.1.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (121) hide show
  1. data/README +3 -3
  2. data/Rakefile +2 -2
  3. data/doc/rdoc/Log4r.html +519 -0
  4. data/doc/rdoc/Log4r/BasicFormatter.html +388 -0
  5. data/doc/rdoc/Log4r/ConfigError.html +225 -0
  6. data/doc/rdoc/Log4r/Configurator.html +1068 -0
  7. data/doc/rdoc/Log4r/DateFileOutputter.html +479 -0
  8. data/doc/rdoc/Log4r/DefaultFormatter.html +223 -0
  9. data/doc/rdoc/Log4r/EmailOutputter.html +654 -0
  10. data/doc/rdoc/Log4r/FileOutputter.html +346 -0
  11. data/doc/rdoc/Log4r/Formatter.html +309 -0
  12. data/doc/rdoc/Log4r/GDC.html +346 -0
  13. data/doc/rdoc/Log4r/GDC_rb.html +80 -0
  14. data/doc/rdoc/Log4r/IOOutputter.html +410 -0
  15. data/doc/rdoc/Log4r/Log4jXmlFormatter.html +337 -0
  16. data/doc/rdoc/Log4r/Log4rConfig.html +211 -0
  17. data/doc/rdoc/Log4r/Log4rTools.html +388 -0
  18. data/doc/rdoc/Log4r/LogEvent.html +378 -0
  19. data/doc/rdoc/Log4r/LogServer.html +340 -0
  20. data/doc/rdoc/Log4r/Logger.html +1150 -0
  21. data/doc/rdoc/Log4r/Logger/LoggerFactory.html +218 -0
  22. data/doc/rdoc/Log4r/Logger/Repository.html +225 -0
  23. data/doc/rdoc/Log4r/MDC.html +424 -0
  24. data/doc/rdoc/Log4r/MDC_rb.html +83 -0
  25. data/doc/rdoc/Log4r/NDC.html +632 -0
  26. data/doc/rdoc/Log4r/NDC_rb.html +110 -0
  27. data/doc/rdoc/Log4r/ObjectFormatter.html +280 -0
  28. data/doc/rdoc/Log4r/Outputter.html +934 -0
  29. data/doc/rdoc/Log4r/Outputter/OutputterFactory.html +218 -0
  30. data/doc/rdoc/Log4r/Outputter/consoleoutputters_rb.html +57 -0
  31. data/doc/rdoc/Log4r/Outputter/datefileoutputter_rb.html +93 -0
  32. data/doc/rdoc/Log4r/Outputter/emailoutputter_rb.html +179 -0
  33. data/doc/rdoc/Log4r/Outputter/fileoutputter_rb.html +64 -0
  34. data/doc/rdoc/Log4r/Outputter/iooutputter_rb.html +59 -0
  35. data/doc/rdoc/Log4r/Outputter/outputter_rb.html +222 -0
  36. data/doc/rdoc/Log4r/Outputter/outputterfactory_rb.html +62 -0
  37. data/doc/rdoc/Log4r/Outputter/remoteoutputter_rb.html +59 -0
  38. data/doc/rdoc/Log4r/Outputter/rollingfileoutputter_rb.html +66 -0
  39. data/doc/rdoc/Log4r/Outputter/staticoutputter_rb.html +55 -0
  40. data/doc/rdoc/Log4r/Outputter/syslogoutputter_rb.html +110 -0
  41. data/doc/rdoc/Log4r/Outputter/udpoutputter_rb.html +220 -0
  42. data/doc/rdoc/Log4r/PatternFormatter.html +404 -0
  43. data/doc/rdoc/Log4r/ROMPClient.html +211 -0
  44. data/doc/rdoc/Log4r/ROMPServer.html +211 -0
  45. data/doc/rdoc/Log4r/RemoteOutputter.html +402 -0
  46. data/doc/rdoc/Log4r/RollingFileOutputter.html +551 -0
  47. data/doc/rdoc/Log4r/RootLogger.html +530 -0
  48. data/doc/rdoc/Log4r/SimpleFormatter.html +276 -0
  49. data/doc/rdoc/Log4r/StderrOutputter.html +268 -0
  50. data/doc/rdoc/Log4r/StdoutOutputter.html +268 -0
  51. data/doc/rdoc/Log4r/SyslogOutputter.html +551 -0
  52. data/doc/rdoc/Log4r/UDPOutputter.html +379 -0
  53. data/doc/rdoc/Log4r/YamlConfigurator.html +966 -0
  54. data/doc/rdoc/Log4r/base_rb.html +57 -0
  55. data/doc/rdoc/Log4r/config_rb.html +122 -0
  56. data/doc/rdoc/Log4r/configurator_rb.html +370 -0
  57. data/doc/rdoc/Log4r/formatter/formatter_rb.html +121 -0
  58. data/doc/rdoc/Log4r/formatter/log4jxmlformatter_rb.html +64 -0
  59. data/doc/rdoc/Log4r/formatter/patternformatter_rb.html +239 -0
  60. data/doc/rdoc/Log4r/lib/drbloader_rb.html +57 -0
  61. data/doc/rdoc/Log4r/lib/xmlloader_rb.html +57 -0
  62. data/doc/rdoc/Log4r/logevent_rb.html +55 -0
  63. data/doc/rdoc/Log4r/logger_rb.html +293 -0
  64. data/doc/rdoc/Log4r/loggerfactory_rb.html +66 -0
  65. data/doc/rdoc/Log4r/logserver_rb.html +161 -0
  66. data/doc/rdoc/Log4r/rdoc/GDC.html +175 -0
  67. data/doc/rdoc/Log4r/rdoc/MDC.html +178 -0
  68. data/doc/rdoc/Log4r/rdoc/NDC.html +207 -0
  69. data/doc/rdoc/Log4r/rdoc/configurator.html +462 -0
  70. data/doc/rdoc/Log4r/rdoc/emailoutputter.html +279 -0
  71. data/doc/rdoc/Log4r/rdoc/formatter.html +218 -0
  72. data/doc/rdoc/Log4r/rdoc/log4r.html +286 -0
  73. data/doc/rdoc/Log4r/rdoc/logger.html +382 -0
  74. data/doc/rdoc/Log4r/rdoc/logserver.html +265 -0
  75. data/doc/rdoc/Log4r/rdoc/outputter.html +313 -0
  76. data/doc/rdoc/Log4r/rdoc/patternformatter.html +331 -0
  77. data/doc/rdoc/Log4r/rdoc/syslogoutputter.html +197 -0
  78. data/doc/rdoc/Log4r/rdoc/win32eventoutputter.html +165 -0
  79. data/doc/rdoc/Log4r/rdoc/yamlconfigurator.html +187 -0
  80. data/doc/rdoc/Log4r/repository_rb.html +74 -0
  81. data/doc/rdoc/Log4r/staticlogger_rb.html +55 -0
  82. data/doc/rdoc/Log4r/yamlconfigurator_rb.html +95 -0
  83. data/doc/rdoc/REXML.html +211 -0
  84. data/doc/rdoc/created.rid +1 -0
  85. data/doc/rdoc/images/brick.png +0 -0
  86. data/doc/rdoc/images/brick_link.png +0 -0
  87. data/doc/rdoc/images/bug.png +0 -0
  88. data/doc/rdoc/images/bullet_black.png +0 -0
  89. data/doc/rdoc/images/bullet_toggle_minus.png +0 -0
  90. data/doc/rdoc/images/bullet_toggle_plus.png +0 -0
  91. data/doc/rdoc/images/date.png +0 -0
  92. data/doc/rdoc/images/find.png +0 -0
  93. data/doc/rdoc/images/loadingAnimation.gif +0 -0
  94. data/doc/rdoc/images/macFFBgHack.png +0 -0
  95. data/doc/rdoc/images/package.png +0 -0
  96. data/doc/rdoc/images/page_green.png +0 -0
  97. data/doc/rdoc/images/page_white_text.png +0 -0
  98. data/doc/rdoc/images/page_white_width.png +0 -0
  99. data/doc/rdoc/images/plugin.png +0 -0
  100. data/doc/rdoc/images/ruby.png +0 -0
  101. data/doc/rdoc/images/tag_green.png +0 -0
  102. data/doc/rdoc/images/wrench.png +0 -0
  103. data/doc/rdoc/images/wrench_orange.png +0 -0
  104. data/doc/rdoc/images/zoom.png +0 -0
  105. data/doc/rdoc/index.html +585 -0
  106. data/doc/rdoc/js/darkfish.js +116 -0
  107. data/doc/rdoc/js/jquery.js +32 -0
  108. data/doc/rdoc/js/quicksearch.js +114 -0
  109. data/doc/rdoc/js/thickbox-compressed.js +10 -0
  110. data/doc/rdoc/log4r-rdoc.css +696 -0
  111. data/doc/rdoc/log4r_rb.html +207 -0
  112. data/doc/rdoc/rdoc.css +696 -0
  113. data/examples/rdoc-gen +2 -0
  114. data/src/log4r.rb +2 -2
  115. data/src/log4r/formatter/patternformatter.rb +15 -15
  116. data/src/log4r/outputter/udpoutputter.rb +4 -4
  117. data/tests/testchainsaw.rb +1 -1
  118. metadata +123 -8
  119. data/src/log4r/outputter/datefileoutputter.patch +0 -24
  120. data/src/log4r/outputter/diff +0 -14
  121. data/src/log4r/outputter/new-datefileoutputter.rb +0 -117
@@ -0,0 +1,340 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+ <head>
6
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
7
+
8
+ <title>Class: Log4r::LogServer</title>
9
+
10
+ <link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
11
+
12
+ <script src="../js/jquery.js" type="text/javascript"
13
+ charset="utf-8"></script>
14
+ <script src="../js/thickbox-compressed.js" type="text/javascript"
15
+ charset="utf-8"></script>
16
+ <script src="../js/quicksearch.js" type="text/javascript"
17
+ charset="utf-8"></script>
18
+ <script src="../js/darkfish.js" type="text/javascript"
19
+ charset="utf-8"></script>
20
+
21
+ </head>
22
+ <body class="class">
23
+
24
+ <div id="metadata">
25
+ <div id="file-metadata">
26
+ <div id="file-list-section" class="section">
27
+ <h3 class="section-header">In Files</h3>
28
+ <div class="section-body">
29
+ <ul>
30
+
31
+ <li><a href="../log4r/logserver_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
32
+ class="thickbox" title="log4r/logserver.rb">log4r/logserver.rb</a></li>
33
+
34
+ </ul>
35
+ </div>
36
+ </div>
37
+
38
+
39
+ </div>
40
+
41
+ <div id="class-metadata">
42
+
43
+ <!-- Parent Class -->
44
+
45
+ <div id="parent-class-section" class="section">
46
+ <h3 class="section-header">Parent</h3>
47
+
48
+ <p class="link">Logger</p>
49
+
50
+ </div>
51
+
52
+
53
+ <!-- Namespace Contents -->
54
+
55
+
56
+ <!-- Method Quickref -->
57
+
58
+ <div id="method-list-section" class="section">
59
+ <h3 class="section-header">Methods</h3>
60
+ <ul class="link-list">
61
+
62
+ <li><a href="#M000061">::new</a></li>
63
+
64
+ <li><a href="#M000062">::new</a></li>
65
+
66
+ </ul>
67
+ </div>
68
+
69
+
70
+ <!-- Included Modules -->
71
+
72
+ <div id="includes-section" class="section">
73
+ <h3 class="section-header">Included Modules</h3>
74
+ <ul class="link-list">
75
+
76
+
77
+ <li><a class="include" href="ROMPClient.html">Log4r::ROMPClient</a></li>
78
+
79
+
80
+ </ul>
81
+ </div>
82
+
83
+ </div>
84
+
85
+ <div id="project-metadata">
86
+
87
+
88
+ <div id="fileindex-section" class="section project-section">
89
+ <h3 class="section-header">Files</h3>
90
+ <ul>
91
+
92
+ <li class="file"><a href="../log4r/rdoc/GDC.html">GDC</a></li>
93
+
94
+ <li class="file"><a href="../log4r/rdoc/MDC.html">MDC</a></li>
95
+
96
+ <li class="file"><a href="../log4r/rdoc/NDC.html">NDC</a></li>
97
+
98
+ <li class="file"><a href="../log4r/rdoc/configurator.html">configurator</a></li>
99
+
100
+ <li class="file"><a href="../log4r/rdoc/emailoutputter.html">emailoutputter</a></li>
101
+
102
+ <li class="file"><a href="../log4r/rdoc/formatter.html">formatter</a></li>
103
+
104
+ <li class="file"><a href="../log4r/rdoc/log4r.html">log4r</a></li>
105
+
106
+ <li class="file"><a href="../log4r/rdoc/logger.html">logger</a></li>
107
+
108
+ <li class="file"><a href="../log4r/rdoc/logserver.html">logserver</a></li>
109
+
110
+ <li class="file"><a href="../log4r/rdoc/outputter.html">outputter</a></li>
111
+
112
+ <li class="file"><a href="../log4r/rdoc/patternformatter.html">patternformatter</a></li>
113
+
114
+ <li class="file"><a href="../log4r/rdoc/syslogoutputter.html">syslogoutputter</a></li>
115
+
116
+ <li class="file"><a href="../log4r/rdoc/win32eventoutputter.html">win32eventoutputter</a></li>
117
+
118
+ <li class="file"><a href="../log4r/rdoc/yamlconfigurator.html">yamlconfigurator</a></li>
119
+
120
+ </ul>
121
+ </div>
122
+
123
+
124
+ <div id="classindex-section" class="section project-section">
125
+ <h3 class="section-header">Class Index
126
+ <span class="search-toggle"><img src="../images/find.png"
127
+ height="16" width="16" alt="[+]"
128
+ title="show/hide quicksearch" /></span></h3>
129
+ <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
130
+ <fieldset>
131
+ <legend>Quicksearch</legend>
132
+ <input type="text" name="quicksearch" value=""
133
+ class="quicksearch-field" />
134
+ </fieldset>
135
+ </form>
136
+
137
+ <ul class="link-list">
138
+
139
+ <li><a href="../Log4r.html">Log4r</a></li>
140
+
141
+ <li><a href="../Log4r/BasicFormatter.html">Log4r::BasicFormatter</a></li>
142
+
143
+ <li><a href="../Log4r/ConfigError.html">Log4r::ConfigError</a></li>
144
+
145
+ <li><a href="../Log4r/Configurator.html">Log4r::Configurator</a></li>
146
+
147
+ <li><a href="../Log4r/DateFileOutputter.html">Log4r::DateFileOutputter</a></li>
148
+
149
+ <li><a href="../Log4r/DefaultFormatter.html">Log4r::DefaultFormatter</a></li>
150
+
151
+ <li><a href="../Log4r/EmailOutputter.html">Log4r::EmailOutputter</a></li>
152
+
153
+ <li><a href="../Log4r/FileOutputter.html">Log4r::FileOutputter</a></li>
154
+
155
+ <li><a href="../Log4r/Formatter.html">Log4r::Formatter</a></li>
156
+
157
+ <li><a href="../Log4r/GDC.html">Log4r::GDC</a></li>
158
+
159
+ <li><a href="../Log4r/IOOutputter.html">Log4r::IOOutputter</a></li>
160
+
161
+ <li><a href="../Log4r/Log4jXmlFormatter.html">Log4r::Log4jXmlFormatter</a></li>
162
+
163
+ <li><a href="../Log4r/Log4rTools.html">Log4r::Log4rTools</a></li>
164
+
165
+ <li><a href="../Log4r/LogEvent.html">Log4r::LogEvent</a></li>
166
+
167
+ <li><a href="../Log4r/LogServer.html">Log4r::LogServer</a></li>
168
+
169
+ <li><a href="../Log4r/Logger.html">Log4r::Logger</a></li>
170
+
171
+ <li><a href="../Log4r/MDC.html">Log4r::MDC</a></li>
172
+
173
+ <li><a href="../Log4r/NDC.html">Log4r::NDC</a></li>
174
+
175
+ <li><a href="../Log4r/ObjectFormatter.html">Log4r::ObjectFormatter</a></li>
176
+
177
+ <li><a href="../Log4r/Outputter.html">Log4r::Outputter</a></li>
178
+
179
+ <li><a href="../Log4r/PatternFormatter.html">Log4r::PatternFormatter</a></li>
180
+
181
+ <li><a href="../Log4r/RemoteOutputter.html">Log4r::RemoteOutputter</a></li>
182
+
183
+ <li><a href="../Log4r/RollingFileOutputter.html">Log4r::RollingFileOutputter</a></li>
184
+
185
+ <li><a href="../Log4r/RootLogger.html">Log4r::RootLogger</a></li>
186
+
187
+ <li><a href="../Log4r/SimpleFormatter.html">Log4r::SimpleFormatter</a></li>
188
+
189
+ <li><a href="../Log4r/StderrOutputter.html">Log4r::StderrOutputter</a></li>
190
+
191
+ <li><a href="../Log4r/StdoutOutputter.html">Log4r::StdoutOutputter</a></li>
192
+
193
+ <li><a href="../Log4r/SyslogOutputter.html">Log4r::SyslogOutputter</a></li>
194
+
195
+ <li><a href="../Log4r/UDPOutputter.html">Log4r::UDPOutputter</a></li>
196
+
197
+ <li><a href="../Log4r/YamlConfigurator.html">Log4r::YamlConfigurator</a></li>
198
+
199
+ </ul>
200
+ <div id="no-class-search-results" style="display: none;">No matching classes.</div>
201
+ </div>
202
+
203
+
204
+ </div>
205
+ </div>
206
+
207
+ <div id="documentation">
208
+ <h1 class="class">Log4r::LogServer</h1>
209
+
210
+ <div id="description">
211
+ <p>
212
+ See <a href="../log4r/logserver_rb.html">log4r/logserver.rb</a>
213
+ </p>
214
+
215
+ </div>
216
+
217
+ <!-- Constants -->
218
+
219
+
220
+ <!-- Attributes -->
221
+
222
+ <div id="attribute-method-details" class="method-section section">
223
+ <h3 class="section-header">Attributes</h3>
224
+
225
+
226
+ <div id="uri-attribute-method" class="method-detail">
227
+ <a name="uri"></a>
228
+
229
+ <div class="method-heading attribute-method-heading">
230
+ <span class="method-name">uri</span><span
231
+ class="attribute-access-type">[R]</span>
232
+ </div>
233
+
234
+ <div class="method-description">
235
+
236
+ <p class="missing-docs">(Not documented)</p>
237
+
238
+ </div>
239
+ </div>
240
+
241
+ </div>
242
+
243
+
244
+ <!-- Methods -->
245
+
246
+ <div id="public-class-method-details" class="method-section section">
247
+ <h3 class="section-header">Public Class Methods</h3>
248
+
249
+
250
+ <div id="new-method" class="method-detail ">
251
+ <a name="M000061"></a>
252
+
253
+ <div class="method-heading">
254
+
255
+ <span class="method-name">new</span><span
256
+ class="method-args">(_fullname, _uri, _level=nil, _additive=true, _trace=false, &accept)</span>
257
+ <span class="method-click-advice">click to toggle source</span>
258
+
259
+ </div>
260
+
261
+ <div class="method-description">
262
+
263
+ <p>
264
+ A valid ROMP uri must be specified.
265
+ </p>
266
+
267
+
268
+
269
+ <div class="method-source-code"
270
+ id="new-source">
271
+ <pre>
272
+ <span class="ruby-comment cmt"># File log4r/logserver.rb, line 12</span>
273
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">_fullname</span>, <span class="ruby-identifier">_uri</span>, <span class="ruby-identifier">_level</span>=<span class="ruby-keyword kw">nil</span>,
274
+ <span class="ruby-identifier">_additive</span>=<span class="ruby-keyword kw">true</span>, <span class="ruby-identifier">_trace</span>=<span class="ruby-keyword kw">false</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">accept</span>)
275
+ <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">_fullname</span>, <span class="ruby-identifier">_level</span>, <span class="ruby-identifier">_additive</span>, <span class="ruby-identifier">_trace</span>)
276
+ <span class="ruby-ivar">@uri</span> = <span class="ruby-identifier">_uri</span>
277
+ <span class="ruby-identifier">start_server</span>(<span class="ruby-identifier">_uri</span>, <span class="ruby-identifier">accept</span>)
278
+ <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">log_internal</span> {<span class="ruby-node">&quot;LogServer started at #{@uri}&quot;</span>}
279
+ <span class="ruby-keyword kw">end</span></pre>
280
+ </div>
281
+
282
+ </div>
283
+
284
+
285
+ </div>
286
+
287
+
288
+ <div id="new-method" class="method-detail ">
289
+ <a name="M000062"></a>
290
+
291
+ <div class="method-heading">
292
+
293
+ <span class="method-name">new</span><span
294
+ class="method-args">(*args)</span>
295
+ <span class="method-click-advice">click to toggle source</span>
296
+
297
+ </div>
298
+
299
+ <div class="method-description">
300
+
301
+ <p class="missing-docs">(Not documented)</p>
302
+
303
+
304
+
305
+ <div class="method-source-code"
306
+ id="new-source">
307
+ <pre>
308
+ <span class="ruby-comment cmt"># File log4r/logserver.rb, line 23</span>
309
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
310
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">RuntimeError</span>, <span class="ruby-value str">&quot;LogServer not supported. ROMP is required&quot;</span>, <span class="ruby-identifier">caller</span>
311
+ <span class="ruby-keyword kw">end</span></pre>
312
+ </div>
313
+
314
+ </div>
315
+
316
+
317
+ </div>
318
+
319
+
320
+ </div>
321
+
322
+
323
+ </div>
324
+
325
+
326
+ <div id="rdoc-debugging-section-dump" class="debugging-section">
327
+
328
+ <p>Disabled; run with --debug to generate this.</p>
329
+
330
+ </div>
331
+
332
+ <div id="validator-badges">
333
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
334
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
335
+ Rdoc Generator</a> 1.1.6</small>.</p>
336
+ </div>
337
+
338
+ </body>
339
+ </html>
340
+
@@ -0,0 +1,1150 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+ <head>
6
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
7
+
8
+ <title>Class: Log4r::Logger</title>
9
+
10
+ <link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
11
+
12
+ <script src="../js/jquery.js" type="text/javascript"
13
+ charset="utf-8"></script>
14
+ <script src="../js/thickbox-compressed.js" type="text/javascript"
15
+ charset="utf-8"></script>
16
+ <script src="../js/quicksearch.js" type="text/javascript"
17
+ charset="utf-8"></script>
18
+ <script src="../js/darkfish.js" type="text/javascript"
19
+ charset="utf-8"></script>
20
+
21
+ </head>
22
+ <body class="class">
23
+
24
+ <div id="metadata">
25
+ <div id="file-metadata">
26
+ <div id="file-list-section" class="section">
27
+ <h3 class="section-header">In Files</h3>
28
+ <div class="section-body">
29
+ <ul>
30
+
31
+ <li><a href="../log4r/loggerfactory_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
32
+ class="thickbox" title="log4r/loggerfactory.rb">log4r/loggerfactory.rb</a></li>
33
+
34
+ <li><a href="../log4r/logger_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
35
+ class="thickbox" title="log4r/logger.rb">log4r/logger.rb</a></li>
36
+
37
+ <li><a href="../log4r/staticlogger_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
38
+ class="thickbox" title="log4r/staticlogger.rb">log4r/staticlogger.rb</a></li>
39
+
40
+ <li><a href="../log4r/repository_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
41
+ class="thickbox" title="log4r/repository.rb">log4r/repository.rb</a></li>
42
+
43
+ </ul>
44
+ </div>
45
+ </div>
46
+
47
+
48
+ </div>
49
+
50
+ <div id="class-metadata">
51
+
52
+ <!-- Parent Class -->
53
+
54
+ <div id="parent-class-section" class="section">
55
+ <h3 class="section-header">Parent</h3>
56
+
57
+ <p class="link">Object</p>
58
+
59
+ </div>
60
+
61
+
62
+ <!-- Namespace Contents -->
63
+
64
+ <div id="namespace-list-section" class="section">
65
+ <h3 class="section-header">Namespace</h3>
66
+ <ul class="link-list">
67
+
68
+ <li><span class="type">CLASS</span> <a href="Logger/LoggerFactory.html">Log4r::Logger::LoggerFactory</a></li>
69
+
70
+ <li><span class="type">CLASS</span> <a href="Logger/Repository.html">Log4r::Logger::Repository</a></li>
71
+
72
+ </ul>
73
+ </div>
74
+
75
+
76
+ <!-- Method Quickref -->
77
+
78
+ <div id="method-list-section" class="section">
79
+ <h3 class="section-header">Methods</h3>
80
+ <ul class="link-list">
81
+
82
+ <li><a href="#M000133">::[]</a></li>
83
+
84
+ <li><a href="#M000135">::each</a></li>
85
+
86
+ <li><a href="#M000136">::each_logger</a></li>
87
+
88
+ <li><a href="#M000134">::get</a></li>
89
+
90
+ <li><a href="#M000132">::global</a></li>
91
+
92
+ <li><a href="#M000137">::log_internal</a></li>
93
+
94
+ <li><a href="#M000041">::new</a></li>
95
+
96
+ <li><a href="#M000131">::root</a></li>
97
+
98
+ <li><a href="#M000052">#==</a></li>
99
+
100
+ <li><a href="#M000049">#add</a></li>
101
+
102
+ <li><a href="#M000045">#additive=</a></li>
103
+
104
+ <li><a href="#M000043">#deal_with_inheritance</a></li>
105
+
106
+ <li><a href="#M000051">#is_root?</a></li>
107
+
108
+ <li><a href="#M000044">#level=</a></li>
109
+
110
+ <li><a href="#M000048">#outputters=</a></li>
111
+
112
+ <li><a href="#M000047">#parent=</a></li>
113
+
114
+ <li><a href="#M000050">#remove</a></li>
115
+
116
+ <li><a href="#M000046">#trace=</a></li>
117
+
118
+ <li><a href="#M000042">#validate_name</a></li>
119
+
120
+ </ul>
121
+ </div>
122
+
123
+
124
+ <!-- Included Modules -->
125
+
126
+ </div>
127
+
128
+ <div id="project-metadata">
129
+
130
+
131
+ <div id="fileindex-section" class="section project-section">
132
+ <h3 class="section-header">Files</h3>
133
+ <ul>
134
+
135
+ <li class="file"><a href="../log4r/rdoc/GDC.html">GDC</a></li>
136
+
137
+ <li class="file"><a href="../log4r/rdoc/MDC.html">MDC</a></li>
138
+
139
+ <li class="file"><a href="../log4r/rdoc/NDC.html">NDC</a></li>
140
+
141
+ <li class="file"><a href="../log4r/rdoc/configurator.html">configurator</a></li>
142
+
143
+ <li class="file"><a href="../log4r/rdoc/emailoutputter.html">emailoutputter</a></li>
144
+
145
+ <li class="file"><a href="../log4r/rdoc/formatter.html">formatter</a></li>
146
+
147
+ <li class="file"><a href="../log4r/rdoc/log4r.html">log4r</a></li>
148
+
149
+ <li class="file"><a href="../log4r/rdoc/logger.html">logger</a></li>
150
+
151
+ <li class="file"><a href="../log4r/rdoc/logserver.html">logserver</a></li>
152
+
153
+ <li class="file"><a href="../log4r/rdoc/outputter.html">outputter</a></li>
154
+
155
+ <li class="file"><a href="../log4r/rdoc/patternformatter.html">patternformatter</a></li>
156
+
157
+ <li class="file"><a href="../log4r/rdoc/syslogoutputter.html">syslogoutputter</a></li>
158
+
159
+ <li class="file"><a href="../log4r/rdoc/win32eventoutputter.html">win32eventoutputter</a></li>
160
+
161
+ <li class="file"><a href="../log4r/rdoc/yamlconfigurator.html">yamlconfigurator</a></li>
162
+
163
+ </ul>
164
+ </div>
165
+
166
+
167
+ <div id="classindex-section" class="section project-section">
168
+ <h3 class="section-header">Class Index
169
+ <span class="search-toggle"><img src="../images/find.png"
170
+ height="16" width="16" alt="[+]"
171
+ title="show/hide quicksearch" /></span></h3>
172
+ <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
173
+ <fieldset>
174
+ <legend>Quicksearch</legend>
175
+ <input type="text" name="quicksearch" value=""
176
+ class="quicksearch-field" />
177
+ </fieldset>
178
+ </form>
179
+
180
+ <ul class="link-list">
181
+
182
+ <li><a href="../Log4r.html">Log4r</a></li>
183
+
184
+ <li><a href="../Log4r/BasicFormatter.html">Log4r::BasicFormatter</a></li>
185
+
186
+ <li><a href="../Log4r/ConfigError.html">Log4r::ConfigError</a></li>
187
+
188
+ <li><a href="../Log4r/Configurator.html">Log4r::Configurator</a></li>
189
+
190
+ <li><a href="../Log4r/DateFileOutputter.html">Log4r::DateFileOutputter</a></li>
191
+
192
+ <li><a href="../Log4r/DefaultFormatter.html">Log4r::DefaultFormatter</a></li>
193
+
194
+ <li><a href="../Log4r/EmailOutputter.html">Log4r::EmailOutputter</a></li>
195
+
196
+ <li><a href="../Log4r/FileOutputter.html">Log4r::FileOutputter</a></li>
197
+
198
+ <li><a href="../Log4r/Formatter.html">Log4r::Formatter</a></li>
199
+
200
+ <li><a href="../Log4r/GDC.html">Log4r::GDC</a></li>
201
+
202
+ <li><a href="../Log4r/IOOutputter.html">Log4r::IOOutputter</a></li>
203
+
204
+ <li><a href="../Log4r/Log4jXmlFormatter.html">Log4r::Log4jXmlFormatter</a></li>
205
+
206
+ <li><a href="../Log4r/Log4rTools.html">Log4r::Log4rTools</a></li>
207
+
208
+ <li><a href="../Log4r/LogEvent.html">Log4r::LogEvent</a></li>
209
+
210
+ <li><a href="../Log4r/LogServer.html">Log4r::LogServer</a></li>
211
+
212
+ <li><a href="../Log4r/Logger.html">Log4r::Logger</a></li>
213
+
214
+ <li><a href="../Log4r/MDC.html">Log4r::MDC</a></li>
215
+
216
+ <li><a href="../Log4r/NDC.html">Log4r::NDC</a></li>
217
+
218
+ <li><a href="../Log4r/ObjectFormatter.html">Log4r::ObjectFormatter</a></li>
219
+
220
+ <li><a href="../Log4r/Outputter.html">Log4r::Outputter</a></li>
221
+
222
+ <li><a href="../Log4r/PatternFormatter.html">Log4r::PatternFormatter</a></li>
223
+
224
+ <li><a href="../Log4r/RemoteOutputter.html">Log4r::RemoteOutputter</a></li>
225
+
226
+ <li><a href="../Log4r/RollingFileOutputter.html">Log4r::RollingFileOutputter</a></li>
227
+
228
+ <li><a href="../Log4r/RootLogger.html">Log4r::RootLogger</a></li>
229
+
230
+ <li><a href="../Log4r/SimpleFormatter.html">Log4r::SimpleFormatter</a></li>
231
+
232
+ <li><a href="../Log4r/StderrOutputter.html">Log4r::StderrOutputter</a></li>
233
+
234
+ <li><a href="../Log4r/StdoutOutputter.html">Log4r::StdoutOutputter</a></li>
235
+
236
+ <li><a href="../Log4r/SyslogOutputter.html">Log4r::SyslogOutputter</a></li>
237
+
238
+ <li><a href="../Log4r/UDPOutputter.html">Log4r::UDPOutputter</a></li>
239
+
240
+ <li><a href="../Log4r/YamlConfigurator.html">Log4r::YamlConfigurator</a></li>
241
+
242
+ </ul>
243
+ <div id="no-class-search-results" style="display: none;">No matching classes.</div>
244
+ </div>
245
+
246
+
247
+ </div>
248
+ </div>
249
+
250
+ <div id="documentation">
251
+ <h1 class="class">Log4r::Logger</h1>
252
+
253
+ <div id="description">
254
+ <p>
255
+ See <a href="../log4r/logger_rb.html">log4r/logger.rb</a>
256
+ </p>
257
+
258
+ </div>
259
+
260
+ <!-- Constants -->
261
+
262
+
263
+ <!-- Attributes -->
264
+
265
+ <div id="attribute-method-details" class="method-section section">
266
+ <h3 class="section-header">Attributes</h3>
267
+
268
+
269
+ <div id="name-attribute-method" class="method-detail">
270
+ <a name="name"></a>
271
+
272
+ <div class="method-heading attribute-method-heading">
273
+ <span class="method-name">name</span><span
274
+ class="attribute-access-type">[R]</span>
275
+ </div>
276
+
277
+ <div class="method-description">
278
+
279
+ <p class="missing-docs">(Not documented)</p>
280
+
281
+ </div>
282
+ </div>
283
+
284
+ <div id="fullname-attribute-method" class="method-detail">
285
+ <a name="fullname"></a>
286
+
287
+ <div class="method-heading attribute-method-heading">
288
+ <span class="method-name">fullname</span><span
289
+ class="attribute-access-type">[R]</span>
290
+ </div>
291
+
292
+ <div class="method-description">
293
+
294
+ <p class="missing-docs">(Not documented)</p>
295
+
296
+ </div>
297
+ </div>
298
+
299
+ <div id="path-attribute-method" class="method-detail">
300
+ <a name="path"></a>
301
+
302
+ <div class="method-heading attribute-method-heading">
303
+ <span class="method-name">path</span><span
304
+ class="attribute-access-type">[R]</span>
305
+ </div>
306
+
307
+ <div class="method-description">
308
+
309
+ <p class="missing-docs">(Not documented)</p>
310
+
311
+ </div>
312
+ </div>
313
+
314
+ <div id="level-attribute-method" class="method-detail">
315
+ <a name="level"></a>
316
+
317
+ <div class="method-heading attribute-method-heading">
318
+ <span class="method-name">level</span><span
319
+ class="attribute-access-type">[R]</span>
320
+ </div>
321
+
322
+ <div class="method-description">
323
+
324
+ <p class="missing-docs">(Not documented)</p>
325
+
326
+ </div>
327
+ </div>
328
+
329
+ <div id="parent-attribute-method" class="method-detail">
330
+ <a name="parent"></a>
331
+
332
+ <div class="method-heading attribute-method-heading">
333
+ <span class="method-name">parent</span><span
334
+ class="attribute-access-type">[R]</span>
335
+ </div>
336
+
337
+ <div class="method-description">
338
+
339
+ <p class="missing-docs">(Not documented)</p>
340
+
341
+ </div>
342
+ </div>
343
+
344
+ <div id="additive-attribute-method" class="method-detail">
345
+ <a name="additive"></a>
346
+
347
+ <div class="method-heading attribute-method-heading">
348
+ <span class="method-name">additive</span><span
349
+ class="attribute-access-type">[R]</span>
350
+ </div>
351
+
352
+ <div class="method-description">
353
+
354
+ <p class="missing-docs">(Not documented)</p>
355
+
356
+ </div>
357
+ </div>
358
+
359
+ <div id="trace-attribute-method" class="method-detail">
360
+ <a name="trace"></a>
361
+
362
+ <div class="method-heading attribute-method-heading">
363
+ <span class="method-name">trace</span><span
364
+ class="attribute-access-type">[R]</span>
365
+ </div>
366
+
367
+ <div class="method-description">
368
+
369
+ <p class="missing-docs">(Not documented)</p>
370
+
371
+ </div>
372
+ </div>
373
+
374
+ <div id="outputters-attribute-method" class="method-detail">
375
+ <a name="outputters"></a>
376
+
377
+ <div class="method-heading attribute-method-heading">
378
+ <span class="method-name">outputters</span><span
379
+ class="attribute-access-type">[R]</span>
380
+ </div>
381
+
382
+ <div class="method-description">
383
+
384
+ <p class="missing-docs">(Not documented)</p>
385
+
386
+ </div>
387
+ </div>
388
+
389
+ </div>
390
+
391
+
392
+ <!-- Methods -->
393
+
394
+ <div id="public-class-method-details" class="method-section section">
395
+ <h3 class="section-header">Public Class Methods</h3>
396
+
397
+
398
+ <div id="--method" class="method-detail ">
399
+ <a name="M000133"></a>
400
+
401
+ <div class="method-heading">
402
+
403
+ <span class="method-name">[]</span><span
404
+ class="method-args">(_fullname)</span>
405
+ <span class="method-click-advice">click to toggle source</span>
406
+
407
+ </div>
408
+
409
+ <div class="method-description">
410
+
411
+ <p>
412
+ Get a logger with a fullname from the repository or nil if logger
413
+ wasn&#8217;t found.
414
+ </p>
415
+
416
+
417
+
418
+ <div class="method-source-code"
419
+ id="--source">
420
+ <pre>
421
+ <span class="ruby-comment cmt"># File log4r/staticlogger.rb, line 12</span>
422
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-operator">[]</span>(<span class="ruby-identifier">_fullname</span>)
423
+ <span class="ruby-comment cmt"># forces creation of RootLogger if it doesn't exist yet.</span>
424
+ <span class="ruby-keyword kw">return</span> <span class="ruby-constant">RootLogger</span>.<span class="ruby-identifier">instance</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">_fullname</span><span class="ruby-operator">==</span><span class="ruby-value str">'root'</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">_fullname</span><span class="ruby-operator">==</span><span class="ruby-value str">'global'</span>
425
+ <span class="ruby-constant">Repository</span>[<span class="ruby-identifier">_fullname</span>]
426
+ <span class="ruby-keyword kw">end</span></pre>
427
+ </div>
428
+
429
+ </div>
430
+
431
+
432
+ </div>
433
+
434
+
435
+ <div id="each-method" class="method-detail ">
436
+ <a name="M000135"></a>
437
+
438
+ <div class="method-heading">
439
+
440
+ <span class="method-name">each</span><span
441
+ class="method-args">()</span>
442
+ <span class="method-click-advice">click to toggle source</span>
443
+
444
+ </div>
445
+
446
+ <div class="method-description">
447
+
448
+ <p>
449
+ Yields fullname and logger for every logger in the system.
450
+ </p>
451
+
452
+
453
+
454
+ <div class="method-source-code"
455
+ id="each-source">
456
+ <pre>
457
+ <span class="ruby-comment cmt"># File log4r/staticlogger.rb, line 29</span>
458
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">each</span>
459
+ <span class="ruby-keyword kw">for</span> <span class="ruby-identifier">fullname</span>, <span class="ruby-identifier">logger</span> <span class="ruby-keyword kw">in</span> <span class="ruby-constant">Repository</span>.<span class="ruby-identifier">instance</span>.<span class="ruby-identifier">loggers</span>
460
+ <span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">fullname</span>, <span class="ruby-identifier">logger</span>
461
+ <span class="ruby-keyword kw">end</span>
462
+ <span class="ruby-keyword kw">end</span></pre>
463
+ </div>
464
+
465
+ </div>
466
+
467
+
468
+ </div>
469
+
470
+
471
+ <div id="each-logger-method" class="method-detail ">
472
+ <a name="M000136"></a>
473
+
474
+ <div class="method-heading">
475
+
476
+ <span class="method-name">each_logger</span><span
477
+ class="method-args">()</span>
478
+ <span class="method-click-advice">click to toggle source</span>
479
+
480
+ </div>
481
+
482
+ <div class="method-description">
483
+
484
+ <p class="missing-docs">(Not documented)</p>
485
+
486
+
487
+
488
+ <div class="method-source-code"
489
+ id="each-logger-source">
490
+ <pre>
491
+ <span class="ruby-comment cmt"># File log4r/staticlogger.rb, line 35</span>
492
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">each_logger</span>
493
+ <span class="ruby-constant">Repository</span>.<span class="ruby-identifier">instance</span>.<span class="ruby-identifier">loggers</span>.<span class="ruby-identifier">each_value</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">logger</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">logger</span>}
494
+ <span class="ruby-keyword kw">end</span></pre>
495
+ </div>
496
+
497
+ </div>
498
+
499
+
500
+ </div>
501
+
502
+
503
+ <div id="get-method" class="method-detail ">
504
+ <a name="M000134"></a>
505
+
506
+ <div class="method-heading">
507
+
508
+ <span class="method-name">get</span><span
509
+ class="method-args">(_fullname)</span>
510
+ <span class="method-click-advice">click to toggle source</span>
511
+
512
+ </div>
513
+
514
+ <div class="method-description">
515
+
516
+ <p>
517
+ Like Logger[] except that it raises NameError if <a
518
+ href="Logger.html">Logger</a> wasn&#8217;t found.
519
+ </p>
520
+
521
+
522
+
523
+ <div class="method-source-code"
524
+ id="get-source">
525
+ <pre>
526
+ <span class="ruby-comment cmt"># File log4r/staticlogger.rb, line 20</span>
527
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">_fullname</span>)
528
+ <span class="ruby-identifier">logger</span> = <span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">_fullname</span>]
529
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">nil?</span>
530
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">NameError</span>, <span class="ruby-node">&quot;Logger '#{_fullname}' not found.&quot;</span>, <span class="ruby-identifier">caller</span>
531
+ <span class="ruby-keyword kw">end</span>
532
+ <span class="ruby-identifier">logger</span>
533
+ <span class="ruby-keyword kw">end</span></pre>
534
+ </div>
535
+
536
+ </div>
537
+
538
+
539
+ </div>
540
+
541
+
542
+ <div id="global-method" class="method-detail ">
543
+ <a name="M000132"></a>
544
+
545
+ <div class="method-heading">
546
+
547
+ <span class="method-name">global</span><span
548
+ class="method-args">()</span>
549
+ <span class="method-click-advice">click to toggle source</span>
550
+
551
+ </div>
552
+
553
+ <div class="method-description">
554
+
555
+ <p>
556
+ Returns the root logger. Identical to <a
557
+ href="Logger.html#M000131">Logger.root</a>
558
+ </p>
559
+
560
+
561
+
562
+ <div class="method-source-code"
563
+ id="global-source">
564
+ <pre>
565
+ <span class="ruby-comment cmt"># File log4r/staticlogger.rb, line 7</span>
566
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">global</span>; <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">root</span> <span class="ruby-keyword kw">end</span></pre>
567
+ </div>
568
+
569
+ </div>
570
+
571
+
572
+ </div>
573
+
574
+
575
+ <div id="log-internal-method" class="method-detail ">
576
+ <a name="M000137"></a>
577
+
578
+ <div class="method-heading">
579
+
580
+ <span class="method-name">log_internal</span><span
581
+ class="method-args">(level=1)</span>
582
+ <span class="method-click-advice">click to toggle source</span>
583
+
584
+ </div>
585
+
586
+ <div class="method-description">
587
+
588
+ <p>
589
+ Internal logging for <a href="../Log4r.html">Log4r</a> components. Accepts
590
+ only blocks. To see such log events, create a logger named
591
+ &#8216;log4r&#8217; and give it an outputter.
592
+ </p>
593
+
594
+
595
+
596
+ <div class="method-source-code"
597
+ id="log-internal-source">
598
+ <pre>
599
+ <span class="ruby-comment cmt"># File log4r/staticlogger.rb, line 43</span>
600
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">log_internal</span>(<span class="ruby-identifier">level</span>=<span class="ruby-value">1</span>)
601
+ <span class="ruby-identifier">internal</span> = <span class="ruby-constant">Logger</span>[<span class="ruby-value str">'log4r'</span>]
602
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">internal</span>.<span class="ruby-identifier">nil?</span>
603
+ <span class="ruby-identifier">internal</span>.<span class="ruby-identifier">send</span>(<span class="ruby-constant">LNAMES</span>[<span class="ruby-identifier">level</span>].<span class="ruby-identifier">downcase</span>, <span class="ruby-keyword kw">yield</span>)
604
+ <span class="ruby-keyword kw">end</span></pre>
605
+ </div>
606
+
607
+ </div>
608
+
609
+
610
+ </div>
611
+
612
+
613
+ <div id="new-method" class="method-detail ">
614
+ <a name="M000041"></a>
615
+
616
+ <div class="method-heading">
617
+
618
+ <span class="method-name">new</span><span
619
+ class="method-args">(_fullname, _level=nil, _additive=true, _trace=false)</span>
620
+ <span class="method-click-advice">click to toggle source</span>
621
+
622
+ </div>
623
+
624
+ <div class="method-description">
625
+
626
+ <p>
627
+ <a href="Logger.html">Logger</a> requires a name. The last 3 parameters
628
+ are:
629
+ </p>
630
+ <table>
631
+ <tr><td valign="top">level:</td><td>Do I have a level? (Otherwise, I&#8217;ll inherit my parent&#8217;s)
632
+
633
+ </td></tr>
634
+ <tr><td valign="top">additive:</td><td>Am I additive?
635
+
636
+ </td></tr>
637
+ <tr><td valign="top">trace:</td><td>Do I record the execution trace? (slows things a wee bit)
638
+
639
+ </td></tr>
640
+ </table>
641
+
642
+
643
+
644
+ <div class="method-source-code"
645
+ id="new-source">
646
+ <pre>
647
+ <span class="ruby-comment cmt"># File log4r/logger.rb, line 26</span>
648
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">_fullname</span>, <span class="ruby-identifier">_level</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">_additive</span>=<span class="ruby-keyword kw">true</span>, <span class="ruby-identifier">_trace</span>=<span class="ruby-keyword kw">false</span>)
649
+ <span class="ruby-comment cmt"># validation</span>
650
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">&quot;Logger must have a name&quot;</span>, <span class="ruby-identifier">caller</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">_fullname</span>.<span class="ruby-identifier">nil?</span>
651
+ <span class="ruby-constant">Log4rTools</span>.<span class="ruby-identifier">validate_level</span>(<span class="ruby-identifier">_level</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">_level</span>.<span class="ruby-identifier">nil?</span>
652
+ <span class="ruby-identifier">validate_name</span>(<span class="ruby-identifier">_fullname</span>)
653
+
654
+ <span class="ruby-comment cmt"># create the logger</span>
655
+ <span class="ruby-ivar">@fullname</span> = <span class="ruby-identifier">_fullname</span>
656
+ <span class="ruby-ivar">@outputters</span> = []
657
+ <span class="ruby-ivar">@additive</span> = <span class="ruby-identifier">_additive</span>
658
+ <span class="ruby-identifier">deal_with_inheritance</span>(<span class="ruby-identifier">_level</span>)
659
+ <span class="ruby-constant">LoggerFactory</span>.<span class="ruby-identifier">define_methods</span>(<span class="ruby-keyword kw">self</span>)
660
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">trace</span> = <span class="ruby-identifier">_trace</span>
661
+ <span class="ruby-constant">Repository</span>[<span class="ruby-ivar">@fullname</span>] = <span class="ruby-keyword kw">self</span>
662
+ <span class="ruby-keyword kw">end</span></pre>
663
+ </div>
664
+
665
+ </div>
666
+
667
+
668
+ </div>
669
+
670
+
671
+ <div id="root-method" class="method-detail ">
672
+ <a name="M000131"></a>
673
+
674
+ <div class="method-heading">
675
+
676
+ <span class="method-name">root</span><span
677
+ class="method-args">()</span>
678
+ <span class="method-click-advice">click to toggle source</span>
679
+
680
+ </div>
681
+
682
+ <div class="method-description">
683
+
684
+ <p>
685
+ Returns the root logger. Identical to <a
686
+ href="Logger.html#M000132">Logger.global</a>
687
+ </p>
688
+
689
+
690
+
691
+ <div class="method-source-code"
692
+ id="root-source">
693
+ <pre>
694
+ <span class="ruby-comment cmt"># File log4r/staticlogger.rb, line 5</span>
695
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">root</span>; <span class="ruby-keyword kw">return</span> <span class="ruby-constant">RootLogger</span>.<span class="ruby-identifier">instance</span> <span class="ruby-keyword kw">end</span></pre>
696
+ </div>
697
+
698
+ </div>
699
+
700
+
701
+ </div>
702
+
703
+
704
+ </div>
705
+
706
+ <div id="public-instance-method-details" class="method-section section">
707
+ <h3 class="section-header">Public Instance Methods</h3>
708
+
709
+
710
+ <div id="--method" class="method-detail ">
711
+ <a name="M000052"></a>
712
+
713
+ <div class="method-heading">
714
+
715
+ <span class="method-name">==</span><span
716
+ class="method-args">(other)</span>
717
+ <span class="method-click-advice">click to toggle source</span>
718
+
719
+ </div>
720
+
721
+ <div class="method-description">
722
+
723
+ <p class="missing-docs">(Not documented)</p>
724
+
725
+
726
+
727
+ <div class="method-source-code"
728
+ id="--source">
729
+ <pre>
730
+ <span class="ruby-comment cmt"># File log4r/logger.rb, line 140</span>
731
+ <span class="ruby-keyword kw">def</span> <span class="ruby-operator">==</span>(<span class="ruby-identifier">other</span>)
732
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">object_id</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">object_id</span>
733
+ <span class="ruby-keyword kw">end</span></pre>
734
+ </div>
735
+
736
+ </div>
737
+
738
+
739
+ </div>
740
+
741
+
742
+ <div id="add-method" class="method-detail ">
743
+ <a name="M000049"></a>
744
+
745
+ <div class="method-heading">
746
+
747
+ <span class="method-name">add</span><span
748
+ class="method-args">(*_outputters)</span>
749
+ <span class="method-click-advice">click to toggle source</span>
750
+
751
+ </div>
752
+
753
+ <div class="method-description">
754
+
755
+ <p>
756
+ Add outputters by name or by reference. Can be done any time.
757
+ </p>
758
+
759
+
760
+
761
+ <div class="method-source-code"
762
+ id="add-source">
763
+ <pre>
764
+ <span class="ruby-comment cmt"># File log4r/logger.rb, line 114</span>
765
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">_outputters</span>)
766
+ <span class="ruby-keyword kw">for</span> <span class="ruby-identifier">thing</span> <span class="ruby-keyword kw">in</span> <span class="ruby-identifier">_outputters</span>
767
+ <span class="ruby-identifier">o</span> = (<span class="ruby-identifier">thing</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">Outputter</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">thing</span> <span class="ruby-operator">:</span> <span class="ruby-constant">Outputter</span>[<span class="ruby-identifier">thing</span>])
768
+ <span class="ruby-comment cmt"># some basic validation</span>
769
+ <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">o</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">Outputter</span>)
770
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">TypeError</span>, <span class="ruby-node">&quot;Expected kind of Outputter, got #{o.class}&quot;</span>, <span class="ruby-identifier">caller</span>
771
+ <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">o</span>.<span class="ruby-identifier">nil?</span>
772
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">TypeError</span>, <span class="ruby-node">&quot;Couldn't find Outputter '#{thing}'&quot;</span>, <span class="ruby-identifier">caller</span>
773
+ <span class="ruby-keyword kw">end</span>
774
+ <span class="ruby-ivar">@outputters</span>.<span class="ruby-identifier">push</span> <span class="ruby-identifier">o</span>
775
+ <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">log_internal</span> {<span class="ruby-node">&quot;Added outputter '#{o.name}' to '#{@fullname}'&quot;</span>}
776
+ <span class="ruby-keyword kw">end</span>
777
+ <span class="ruby-ivar">@outputters</span>
778
+ <span class="ruby-keyword kw">end</span></pre>
779
+ </div>
780
+
781
+ </div>
782
+
783
+
784
+ </div>
785
+
786
+
787
+ <div id="additive--method" class="method-detail ">
788
+ <a name="M000045"></a>
789
+
790
+ <div class="method-heading">
791
+
792
+ <span class="method-name">additive=</span><span
793
+ class="method-args">(_additive)</span>
794
+ <span class="method-click-advice">click to toggle source</span>
795
+
796
+ </div>
797
+
798
+ <div class="method-description">
799
+
800
+ <p>
801
+ Set the additivity of the logger dynamically. True or false.
802
+ </p>
803
+
804
+
805
+
806
+ <div class="method-source-code"
807
+ id="additive--source">
808
+ <pre>
809
+ <span class="ruby-comment cmt"># File log4r/logger.rb, line 82</span>
810
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">additive=</span>(<span class="ruby-identifier">_additive</span>)
811
+ <span class="ruby-ivar">@additive</span> = <span class="ruby-identifier">_additive</span>
812
+ <span class="ruby-constant">LoggerFactory</span>.<span class="ruby-identifier">define_methods</span>(<span class="ruby-keyword kw">self</span>)
813
+ <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">log_internal</span> {<span class="ruby-node">&quot;Logger '#{@fullname}' is additive&quot;</span>}
814
+ <span class="ruby-ivar">@additive</span>
815
+ <span class="ruby-keyword kw">end</span></pre>
816
+ </div>
817
+
818
+ </div>
819
+
820
+
821
+ </div>
822
+
823
+
824
+ <div id="is-root--method" class="method-detail ">
825
+ <a name="M000051"></a>
826
+
827
+ <div class="method-heading">
828
+
829
+ <span class="method-name">is_root?</span><span
830
+ class="method-args">()</span>
831
+ <span class="method-click-advice">click to toggle source</span>
832
+
833
+ </div>
834
+
835
+ <div class="method-description">
836
+
837
+ <p class="missing-docs">(Not documented)</p>
838
+
839
+
840
+
841
+ <div class="method-source-code"
842
+ id="is-root--source">
843
+ <pre>
844
+ <span class="ruby-comment cmt"># File log4r/logger.rb, line 138</span>
845
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">is_root?</span>; <span class="ruby-keyword kw">false</span> <span class="ruby-keyword kw">end</span></pre>
846
+ </div>
847
+
848
+ </div>
849
+
850
+
851
+ </div>
852
+
853
+
854
+ <div id="level--method" class="method-detail ">
855
+ <a name="M000044"></a>
856
+
857
+ <div class="method-heading">
858
+
859
+ <span class="method-name">level=</span><span
860
+ class="method-args">(_level)</span>
861
+ <span class="method-click-advice">click to toggle source</span>
862
+
863
+ </div>
864
+
865
+ <div class="method-description">
866
+
867
+ <p>
868
+ Set the logger level dynamically. Does not affect children.
869
+ </p>
870
+
871
+
872
+
873
+ <div class="method-source-code"
874
+ id="level--source">
875
+ <pre>
876
+ <span class="ruby-comment cmt"># File log4r/logger.rb, line 73</span>
877
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">level=</span>(<span class="ruby-identifier">_level</span>)
878
+ <span class="ruby-constant">Log4rTools</span>.<span class="ruby-identifier">validate_level</span>(<span class="ruby-identifier">_level</span>)
879
+ <span class="ruby-ivar">@level</span> = <span class="ruby-identifier">_level</span>
880
+ <span class="ruby-constant">LoggerFactory</span>.<span class="ruby-identifier">define_methods</span>(<span class="ruby-keyword kw">self</span>)
881
+ <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">log_internal</span> {<span class="ruby-node">&quot;Logger '#{@fullname}' set to #{LNAMES[@level]}&quot;</span>}
882
+ <span class="ruby-ivar">@level</span>
883
+ <span class="ruby-keyword kw">end</span></pre>
884
+ </div>
885
+
886
+ </div>
887
+
888
+
889
+ </div>
890
+
891
+
892
+ <div id="outputters--method" class="method-detail ">
893
+ <a name="M000048"></a>
894
+
895
+ <div class="method-heading">
896
+
897
+ <span class="method-name">outputters=</span><span
898
+ class="method-args">(_outputters)</span>
899
+ <span class="method-click-advice">click to toggle source</span>
900
+
901
+ </div>
902
+
903
+ <div class="method-description">
904
+
905
+ <p>
906
+ Set the Outputters dynamically by name or reference. Can be done any time.
907
+ </p>
908
+
909
+
910
+
911
+ <div class="method-source-code"
912
+ id="outputters--source">
913
+ <pre>
914
+ <span class="ruby-comment cmt"># File log4r/logger.rb, line 108</span>
915
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">outputters=</span>(<span class="ruby-identifier">_outputters</span>)
916
+ <span class="ruby-ivar">@outputters</span>.<span class="ruby-identifier">clear</span>
917
+ <span class="ruby-identifier">add</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">_outputters</span>)
918
+ <span class="ruby-keyword kw">end</span></pre>
919
+ </div>
920
+
921
+ </div>
922
+
923
+
924
+ </div>
925
+
926
+
927
+ <div id="parent--method" class="method-detail ">
928
+ <a name="M000047"></a>
929
+
930
+ <div class="method-heading">
931
+
932
+ <span class="method-name">parent=</span><span
933
+ class="method-args">(parent)</span>
934
+ <span class="method-click-advice">click to toggle source</span>
935
+
936
+ </div>
937
+
938
+ <div class="method-description">
939
+
940
+ <p>
941
+ Please don&#8217;t reset the parent
942
+ </p>
943
+
944
+
945
+
946
+ <div class="method-source-code"
947
+ id="parent--source">
948
+ <pre>
949
+ <span class="ruby-comment cmt"># File log4r/logger.rb, line 102</span>
950
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">parent=</span>(<span class="ruby-identifier">parent</span>)
951
+ <span class="ruby-ivar">@parent</span> = <span class="ruby-identifier">parent</span>
952
+ <span class="ruby-keyword kw">end</span></pre>
953
+ </div>
954
+
955
+ </div>
956
+
957
+
958
+ </div>
959
+
960
+
961
+ <div id="remove-method" class="method-detail ">
962
+ <a name="M000050"></a>
963
+
964
+ <div class="method-heading">
965
+
966
+ <span class="method-name">remove</span><span
967
+ class="method-args">(*_outputters)</span>
968
+ <span class="method-click-advice">click to toggle source</span>
969
+
970
+ </div>
971
+
972
+ <div class="method-description">
973
+
974
+ <p>
975
+ Remove outputters from this logger by name only. Can be done any time.
976
+ </p>
977
+
978
+
979
+
980
+ <div class="method-source-code"
981
+ id="remove-source">
982
+ <pre>
983
+ <span class="ruby-comment cmt"># File log4r/logger.rb, line 130</span>
984
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remove</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">_outputters</span>)
985
+ <span class="ruby-keyword kw">for</span> <span class="ruby-identifier">name</span> <span class="ruby-keyword kw">in</span> <span class="ruby-identifier">_outputters</span>
986
+ <span class="ruby-identifier">o</span> = <span class="ruby-constant">Outputter</span>[<span class="ruby-identifier">name</span>]
987
+ <span class="ruby-ivar">@outputters</span>.<span class="ruby-identifier">delete</span> <span class="ruby-identifier">o</span>
988
+ <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">log_internal</span> {<span class="ruby-node">&quot;Removed outputter '#{o.name}' from '#{@fullname}'&quot;</span>}
989
+ <span class="ruby-keyword kw">end</span>
990
+ <span class="ruby-keyword kw">end</span></pre>
991
+ </div>
992
+
993
+ </div>
994
+
995
+
996
+ </div>
997
+
998
+
999
+ <div id="trace--method" class="method-detail ">
1000
+ <a name="M000046"></a>
1001
+
1002
+ <div class="method-heading">
1003
+
1004
+ <span class="method-name">trace=</span><span
1005
+ class="method-args">(_trace)</span>
1006
+ <span class="method-click-advice">click to toggle source</span>
1007
+
1008
+ </div>
1009
+
1010
+ <div class="method-description">
1011
+
1012
+ <p>
1013
+ Set whether the logger traces. Can be set dynamically. Defaults to false
1014
+ and understands the strings &#8216;true&#8217; and &#8216;false&#8217;.
1015
+ </p>
1016
+
1017
+
1018
+
1019
+ <div class="method-source-code"
1020
+ id="trace--source">
1021
+ <pre>
1022
+ <span class="ruby-comment cmt"># File log4r/logger.rb, line 91</span>
1023
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">trace=</span>(<span class="ruby-identifier">_trace</span>)
1024
+ <span class="ruby-ivar">@trace</span> =
1025
+ <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">_trace</span>
1026
+ <span class="ruby-keyword kw">when</span> <span class="ruby-value str">&quot;true&quot;</span>, <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">then</span> <span class="ruby-keyword kw">true</span>
1027
+ <span class="ruby-keyword kw">else</span> <span class="ruby-keyword kw">false</span> <span class="ruby-keyword kw">end</span>
1028
+ <span class="ruby-constant">LoggerFactory</span>.<span class="ruby-identifier">define_methods</span>(<span class="ruby-keyword kw">self</span>)
1029
+ <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">log_internal</span> {<span class="ruby-node">&quot;Logger '#{@fullname}' is tracing&quot;</span>} <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@trace</span>
1030
+ <span class="ruby-ivar">@trace</span>
1031
+ <span class="ruby-keyword kw">end</span></pre>
1032
+ </div>
1033
+
1034
+ </div>
1035
+
1036
+
1037
+ </div>
1038
+
1039
+
1040
+ </div>
1041
+
1042
+ <div id="private-instance-method-details" class="method-section section">
1043
+ <h3 class="section-header">Private Instance Methods</h3>
1044
+
1045
+
1046
+ <div id="deal-with-inheritance-method" class="method-detail ">
1047
+ <a name="M000043"></a>
1048
+
1049
+ <div class="method-heading">
1050
+
1051
+ <span class="method-name">deal_with_inheritance</span><span
1052
+ class="method-args">(_level)</span>
1053
+ <span class="method-click-advice">click to toggle source</span>
1054
+
1055
+ </div>
1056
+
1057
+ <div class="method-description">
1058
+
1059
+ <p>
1060
+ Parses name for location in heiarchy, sets the parent, and deals with level
1061
+ inheritance
1062
+ </p>
1063
+
1064
+
1065
+
1066
+ <div class="method-source-code"
1067
+ id="deal-with-inheritance-source">
1068
+ <pre>
1069
+ <span class="ruby-comment cmt"># File log4r/logger.rb, line 53</span>
1070
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">deal_with_inheritance</span>(<span class="ruby-identifier">_level</span>)
1071
+ <span class="ruby-identifier">mypath</span> = <span class="ruby-ivar">@fullname</span>.<span class="ruby-identifier">split</span> <span class="ruby-constant">Log4rConfig</span><span class="ruby-operator">::</span><span class="ruby-constant">LoggerPathDelimiter</span>
1072
+ <span class="ruby-ivar">@name</span> = <span class="ruby-identifier">mypath</span>.<span class="ruby-identifier">pop</span>
1073
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">mypath</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-comment cmt"># then root is my daddy</span>
1074
+ <span class="ruby-ivar">@path</span> = <span class="ruby-value str">&quot;&quot;</span>
1075
+ <span class="ruby-comment cmt"># This is one of the guarantees that RootLogger gets created</span>
1076
+ <span class="ruby-ivar">@parent</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">root</span>
1077
+ <span class="ruby-keyword kw">else</span>
1078
+ <span class="ruby-ivar">@path</span> = <span class="ruby-identifier">mypath</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">Log4rConfig</span><span class="ruby-operator">::</span><span class="ruby-constant">LoggerPathDelimiter</span>)
1079
+ <span class="ruby-ivar">@parent</span> = <span class="ruby-constant">Repository</span>.<span class="ruby-identifier">find_ancestor</span>(<span class="ruby-ivar">@path</span>)
1080
+ <span class="ruby-ivar">@parent</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">root</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@parent</span>.<span class="ruby-identifier">nil?</span>
1081
+ <span class="ruby-keyword kw">end</span>
1082
+ <span class="ruby-comment cmt"># inherit the level if no level defined</span>
1083
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">_level</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword kw">then</span> <span class="ruby-ivar">@level</span> = <span class="ruby-ivar">@parent</span>.<span class="ruby-identifier">level</span>
1084
+ <span class="ruby-keyword kw">else</span> <span class="ruby-ivar">@level</span> = <span class="ruby-identifier">_level</span> <span class="ruby-keyword kw">end</span>
1085
+ <span class="ruby-constant">Repository</span>.<span class="ruby-identifier">reassign_any_children</span>(<span class="ruby-keyword kw">self</span>)
1086
+ <span class="ruby-keyword kw">end</span></pre>
1087
+ </div>
1088
+
1089
+ </div>
1090
+
1091
+
1092
+ </div>
1093
+
1094
+
1095
+ <div id="validate-name-method" class="method-detail ">
1096
+ <a name="M000042"></a>
1097
+
1098
+ <div class="method-heading">
1099
+
1100
+ <span class="method-name">validate_name</span><span
1101
+ class="method-args">(_fullname)</span>
1102
+ <span class="method-click-advice">click to toggle source</span>
1103
+
1104
+ </div>
1105
+
1106
+ <div class="method-description">
1107
+
1108
+ <p class="missing-docs">(Not documented)</p>
1109
+
1110
+
1111
+
1112
+ <div class="method-source-code"
1113
+ id="validate-name-source">
1114
+ <pre>
1115
+ <span class="ruby-comment cmt"># File log4r/logger.rb, line 42</span>
1116
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">validate_name</span>(<span class="ruby-identifier">_fullname</span>)
1117
+ <span class="ruby-identifier">parts</span> = <span class="ruby-identifier">_fullname</span>.<span class="ruby-identifier">split</span> <span class="ruby-constant">Log4rConfig</span><span class="ruby-operator">::</span><span class="ruby-constant">LoggerPathDelimiter</span>
1118
+ <span class="ruby-keyword kw">for</span> <span class="ruby-identifier">part</span> <span class="ruby-keyword kw">in</span> <span class="ruby-identifier">parts</span>
1119
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">&quot;Malformed path&quot;</span>, <span class="ruby-identifier">caller</span>[<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">part</span>.<span class="ruby-identifier">empty?</span>
1120
+ <span class="ruby-keyword kw">end</span>
1121
+ <span class="ruby-keyword kw">end</span></pre>
1122
+ </div>
1123
+
1124
+ </div>
1125
+
1126
+
1127
+ </div>
1128
+
1129
+
1130
+ </div>
1131
+
1132
+
1133
+ </div>
1134
+
1135
+
1136
+ <div id="rdoc-debugging-section-dump" class="debugging-section">
1137
+
1138
+ <p>Disabled; run with --debug to generate this.</p>
1139
+
1140
+ </div>
1141
+
1142
+ <div id="validator-badges">
1143
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
1144
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
1145
+ Rdoc Generator</a> 1.1.6</small>.</p>
1146
+ </div>
1147
+
1148
+ </body>
1149
+ </html>
1150
+