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,379 @@
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::UDPOutputter</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/outputter/udpoutputter_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
32
+ class="thickbox" title="log4r/outputter/udpoutputter.rb">log4r/outputter/udpoutputter.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">Outputter</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="#M000123">::new</a></li>
63
+
64
+ <li><a href="#M000124">#write</a></li>
65
+
66
+ </ul>
67
+ </div>
68
+
69
+
70
+ <!-- Included Modules -->
71
+
72
+ </div>
73
+
74
+ <div id="project-metadata">
75
+
76
+
77
+ <div id="fileindex-section" class="section project-section">
78
+ <h3 class="section-header">Files</h3>
79
+ <ul>
80
+
81
+ <li class="file"><a href="../log4r/rdoc/GDC.html">GDC</a></li>
82
+
83
+ <li class="file"><a href="../log4r/rdoc/MDC.html">MDC</a></li>
84
+
85
+ <li class="file"><a href="../log4r/rdoc/NDC.html">NDC</a></li>
86
+
87
+ <li class="file"><a href="../log4r/rdoc/configurator.html">configurator</a></li>
88
+
89
+ <li class="file"><a href="../log4r/rdoc/emailoutputter.html">emailoutputter</a></li>
90
+
91
+ <li class="file"><a href="../log4r/rdoc/formatter.html">formatter</a></li>
92
+
93
+ <li class="file"><a href="../log4r/rdoc/log4r.html">log4r</a></li>
94
+
95
+ <li class="file"><a href="../log4r/rdoc/logger.html">logger</a></li>
96
+
97
+ <li class="file"><a href="../log4r/rdoc/logserver.html">logserver</a></li>
98
+
99
+ <li class="file"><a href="../log4r/rdoc/outputter.html">outputter</a></li>
100
+
101
+ <li class="file"><a href="../log4r/rdoc/patternformatter.html">patternformatter</a></li>
102
+
103
+ <li class="file"><a href="../log4r/rdoc/syslogoutputter.html">syslogoutputter</a></li>
104
+
105
+ <li class="file"><a href="../log4r/rdoc/win32eventoutputter.html">win32eventoutputter</a></li>
106
+
107
+ <li class="file"><a href="../log4r/rdoc/yamlconfigurator.html">yamlconfigurator</a></li>
108
+
109
+ </ul>
110
+ </div>
111
+
112
+
113
+ <div id="classindex-section" class="section project-section">
114
+ <h3 class="section-header">Class Index
115
+ <span class="search-toggle"><img src="../images/find.png"
116
+ height="16" width="16" alt="[+]"
117
+ title="show/hide quicksearch" /></span></h3>
118
+ <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
119
+ <fieldset>
120
+ <legend>Quicksearch</legend>
121
+ <input type="text" name="quicksearch" value=""
122
+ class="quicksearch-field" />
123
+ </fieldset>
124
+ </form>
125
+
126
+ <ul class="link-list">
127
+
128
+ <li><a href="../Log4r.html">Log4r</a></li>
129
+
130
+ <li><a href="../Log4r/BasicFormatter.html">Log4r::BasicFormatter</a></li>
131
+
132
+ <li><a href="../Log4r/ConfigError.html">Log4r::ConfigError</a></li>
133
+
134
+ <li><a href="../Log4r/Configurator.html">Log4r::Configurator</a></li>
135
+
136
+ <li><a href="../Log4r/DateFileOutputter.html">Log4r::DateFileOutputter</a></li>
137
+
138
+ <li><a href="../Log4r/DefaultFormatter.html">Log4r::DefaultFormatter</a></li>
139
+
140
+ <li><a href="../Log4r/EmailOutputter.html">Log4r::EmailOutputter</a></li>
141
+
142
+ <li><a href="../Log4r/FileOutputter.html">Log4r::FileOutputter</a></li>
143
+
144
+ <li><a href="../Log4r/Formatter.html">Log4r::Formatter</a></li>
145
+
146
+ <li><a href="../Log4r/GDC.html">Log4r::GDC</a></li>
147
+
148
+ <li><a href="../Log4r/IOOutputter.html">Log4r::IOOutputter</a></li>
149
+
150
+ <li><a href="../Log4r/Log4jXmlFormatter.html">Log4r::Log4jXmlFormatter</a></li>
151
+
152
+ <li><a href="../Log4r/Log4rTools.html">Log4r::Log4rTools</a></li>
153
+
154
+ <li><a href="../Log4r/LogEvent.html">Log4r::LogEvent</a></li>
155
+
156
+ <li><a href="../Log4r/LogServer.html">Log4r::LogServer</a></li>
157
+
158
+ <li><a href="../Log4r/Logger.html">Log4r::Logger</a></li>
159
+
160
+ <li><a href="../Log4r/MDC.html">Log4r::MDC</a></li>
161
+
162
+ <li><a href="../Log4r/NDC.html">Log4r::NDC</a></li>
163
+
164
+ <li><a href="../Log4r/ObjectFormatter.html">Log4r::ObjectFormatter</a></li>
165
+
166
+ <li><a href="../Log4r/Outputter.html">Log4r::Outputter</a></li>
167
+
168
+ <li><a href="../Log4r/PatternFormatter.html">Log4r::PatternFormatter</a></li>
169
+
170
+ <li><a href="../Log4r/RemoteOutputter.html">Log4r::RemoteOutputter</a></li>
171
+
172
+ <li><a href="../Log4r/RollingFileOutputter.html">Log4r::RollingFileOutputter</a></li>
173
+
174
+ <li><a href="../Log4r/RootLogger.html">Log4r::RootLogger</a></li>
175
+
176
+ <li><a href="../Log4r/SimpleFormatter.html">Log4r::SimpleFormatter</a></li>
177
+
178
+ <li><a href="../Log4r/StderrOutputter.html">Log4r::StderrOutputter</a></li>
179
+
180
+ <li><a href="../Log4r/StdoutOutputter.html">Log4r::StdoutOutputter</a></li>
181
+
182
+ <li><a href="../Log4r/SyslogOutputter.html">Log4r::SyslogOutputter</a></li>
183
+
184
+ <li><a href="../Log4r/UDPOutputter.html">Log4r::UDPOutputter</a></li>
185
+
186
+ <li><a href="../Log4r/YamlConfigurator.html">Log4r::YamlConfigurator</a></li>
187
+
188
+ </ul>
189
+ <div id="no-class-search-results" style="display: none;">No matching classes.</div>
190
+ </div>
191
+
192
+
193
+ </div>
194
+ </div>
195
+
196
+ <div id="documentation">
197
+ <h1 class="class">Log4r::UDPOutputter</h1>
198
+
199
+ <div id="description">
200
+
201
+ </div>
202
+
203
+ <!-- Constants -->
204
+
205
+
206
+ <!-- Attributes -->
207
+
208
+ <div id="attribute-method-details" class="method-section section">
209
+ <h3 class="section-header">Attributes</h3>
210
+
211
+
212
+ <div id="host-attribute-method" class="method-detail">
213
+ <a name="host"></a>
214
+
215
+ <div class="method-heading attribute-method-heading">
216
+ <span class="method-name">host</span><span
217
+ class="attribute-access-type">[R]</span>
218
+ </div>
219
+
220
+ <div class="method-description">
221
+
222
+ <p class="missing-docs">(Not documented)</p>
223
+
224
+ </div>
225
+ </div>
226
+
227
+ <div id="port-attribute-method" class="method-detail">
228
+ <a name="port"></a>
229
+
230
+ <div class="method-heading attribute-method-heading">
231
+ <span class="method-name">port</span><span
232
+ class="attribute-access-type">[R]</span>
233
+ </div>
234
+
235
+ <div class="method-description">
236
+
237
+ <p class="missing-docs">(Not documented)</p>
238
+
239
+ </div>
240
+ </div>
241
+
242
+ <div id="udpsock-attribute-method" class="method-detail">
243
+ <a name="udpsock"></a>
244
+
245
+ <a name="udpsock="></a>
246
+
247
+ <div class="method-heading attribute-method-heading">
248
+ <span class="method-name">udpsock</span><span
249
+ class="attribute-access-type">[RW]</span>
250
+ </div>
251
+
252
+ <div class="method-description">
253
+
254
+ <p class="missing-docs">(Not documented)</p>
255
+
256
+ </div>
257
+ </div>
258
+
259
+ </div>
260
+
261
+
262
+ <!-- Methods -->
263
+
264
+ <div id="public-class-method-details" class="method-section section">
265
+ <h3 class="section-header">Public Class Methods</h3>
266
+
267
+
268
+ <div id="new-method" class="method-detail ">
269
+ <a name="M000123"></a>
270
+
271
+ <div class="method-heading">
272
+
273
+ <span class="method-name">new</span><span
274
+ class="method-args">(_name, hash={})</span>
275
+ <span class="method-click-advice">click to toggle source</span>
276
+
277
+ </div>
278
+
279
+ <div class="method-description">
280
+
281
+ <p class="missing-docs">(Not documented)</p>
282
+
283
+
284
+
285
+ <div class="method-source-code"
286
+ id="new-source">
287
+ <pre>
288
+ <span class="ruby-comment cmt"># File log4r/outputter/udpoutputter.rb, line 18</span>
289
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">_name</span>, <span class="ruby-identifier">hash</span>={})
290
+ <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">_name</span>, <span class="ruby-identifier">hash</span>)
291
+ <span class="ruby-ivar">@host</span> = <span class="ruby-identifier">hash</span>[<span class="ruby-identifier">:hostname</span>]
292
+ <span class="ruby-ivar">@port</span> = <span class="ruby-identifier">hash</span>[<span class="ruby-identifier">:port</span>]
293
+
294
+ <span class="ruby-keyword kw">begin</span>
295
+ <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">log_internal</span> {
296
+ <span class="ruby-node">&quot;UDPOutputter will send to #{@host}:#{@port}&quot;</span>
297
+ }
298
+ <span class="ruby-ivar">@udpsock</span> = <span class="ruby-constant">UDPSocket</span>.<span class="ruby-identifier">new</span>
299
+ <span class="ruby-ivar">@udpsock</span>.<span class="ruby-identifier">connect</span>( <span class="ruby-ivar">@host</span>, <span class="ruby-ivar">@port</span> )
300
+ <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
301
+ <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">log_internal</span>(<span class="ruby-constant">ERROR</span>) {
302
+ <span class="ruby-node">&quot;UDPOutputter failed to create UDP socket: #{e}&quot;</span>
303
+ }
304
+ <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">log_internal</span> {<span class="ruby-identifier">e</span>}
305
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">level</span> = <span class="ruby-constant">OFF</span>
306
+ <span class="ruby-identifier">raise</span> <span class="ruby-identifier">e</span>
307
+ <span class="ruby-keyword kw">end</span>
308
+ <span class="ruby-keyword kw">end</span></pre>
309
+ </div>
310
+
311
+ </div>
312
+
313
+
314
+ </div>
315
+
316
+
317
+ </div>
318
+
319
+ <div id="private-instance-method-details" class="method-section section">
320
+ <h3 class="section-header">Private Instance Methods</h3>
321
+
322
+
323
+ <div id="write-method" class="method-detail ">
324
+ <a name="M000124"></a>
325
+
326
+ <div class="method-heading">
327
+
328
+ <span class="method-name">write</span><span
329
+ class="method-args">(data)</span>
330
+ <span class="method-click-advice">click to toggle source</span>
331
+
332
+ </div>
333
+
334
+ <div class="method-description">
335
+
336
+
337
+
338
+
339
+
340
+ <div class="method-source-code"
341
+ id="write-source">
342
+ <pre>
343
+ <span class="ruby-comment cmt"># File log4r/outputter/udpoutputter.rb, line 43</span>
344
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">write</span>(<span class="ruby-identifier">data</span>)
345
+ <span class="ruby-ivar">@udpsock</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">data</span>, <span class="ruby-value">0</span>)
346
+ <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
347
+ <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">log_internal</span>(<span class="ruby-constant">ERROR</span>) {
348
+ <span class="ruby-node">&quot;UDPOutputter failed to send data to #{@host}:#{@port}, #{e}&quot;</span>
349
+ }
350
+ <span class="ruby-keyword kw">end</span></pre>
351
+ </div>
352
+
353
+ </div>
354
+
355
+
356
+ </div>
357
+
358
+
359
+ </div>
360
+
361
+
362
+ </div>
363
+
364
+
365
+ <div id="rdoc-debugging-section-dump" class="debugging-section">
366
+
367
+ <p>Disabled; run with --debug to generate this.</p>
368
+
369
+ </div>
370
+
371
+ <div id="validator-badges">
372
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
373
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
374
+ Rdoc Generator</a> 1.1.6</small>.</p>
375
+ </div>
376
+
377
+ </body>
378
+ </html>
379
+
@@ -0,0 +1,966 @@
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::YamlConfigurator</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/yamlconfigurator_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
32
+ class="thickbox" title="log4r/yamlconfigurator.rb">log4r/yamlconfigurator.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">Object</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="#M000138">::[]</a></li>
63
+
64
+ <li><a href="#M000139">::[]=</a></li>
65
+
66
+ <li><a href="#M000143">::actual_load</a></li>
67
+
68
+ <li><a href="#M000140">::custom_levels</a></li>
69
+
70
+ <li><a href="#M000146">::decode_custom_levels</a></li>
71
+
72
+ <li><a href="#M000150">::decode_formatter</a></li>
73
+
74
+ <li><a href="#M000151">::decode_hash_params</a></li>
75
+
76
+ <li><a href="#M000153">::decode_logger</a></li>
77
+
78
+ <li><a href="#M000155">::decode_logger_common</a></li>
79
+
80
+ <li><a href="#M000154">::decode_logserver</a></li>
81
+
82
+ <li><a href="#M000149">::decode_outputter</a></li>
83
+
84
+ <li><a href="#M000148">::decode_parameters</a></li>
85
+
86
+ <li><a href="#M000145">::decode_pre_config</a></li>
87
+
88
+ <li><a href="#M000144">::decode_yaml</a></li>
89
+
90
+ <li><a href="#M000147">::global_config</a></li>
91
+
92
+ <li><a href="#M000141">::load_yaml_file</a></li>
93
+
94
+ <li><a href="#M000142">::load_yaml_string</a></li>
95
+
96
+ <li><a href="#M000152">::paramsub</a></li>
97
+
98
+ </ul>
99
+ </div>
100
+
101
+
102
+ <!-- Included Modules -->
103
+
104
+ </div>
105
+
106
+ <div id="project-metadata">
107
+
108
+
109
+ <div id="fileindex-section" class="section project-section">
110
+ <h3 class="section-header">Files</h3>
111
+ <ul>
112
+
113
+ <li class="file"><a href="../log4r/rdoc/GDC.html">GDC</a></li>
114
+
115
+ <li class="file"><a href="../log4r/rdoc/MDC.html">MDC</a></li>
116
+
117
+ <li class="file"><a href="../log4r/rdoc/NDC.html">NDC</a></li>
118
+
119
+ <li class="file"><a href="../log4r/rdoc/configurator.html">configurator</a></li>
120
+
121
+ <li class="file"><a href="../log4r/rdoc/emailoutputter.html">emailoutputter</a></li>
122
+
123
+ <li class="file"><a href="../log4r/rdoc/formatter.html">formatter</a></li>
124
+
125
+ <li class="file"><a href="../log4r/rdoc/log4r.html">log4r</a></li>
126
+
127
+ <li class="file"><a href="../log4r/rdoc/logger.html">logger</a></li>
128
+
129
+ <li class="file"><a href="../log4r/rdoc/logserver.html">logserver</a></li>
130
+
131
+ <li class="file"><a href="../log4r/rdoc/outputter.html">outputter</a></li>
132
+
133
+ <li class="file"><a href="../log4r/rdoc/patternformatter.html">patternformatter</a></li>
134
+
135
+ <li class="file"><a href="../log4r/rdoc/syslogoutputter.html">syslogoutputter</a></li>
136
+
137
+ <li class="file"><a href="../log4r/rdoc/win32eventoutputter.html">win32eventoutputter</a></li>
138
+
139
+ <li class="file"><a href="../log4r/rdoc/yamlconfigurator.html">yamlconfigurator</a></li>
140
+
141
+ </ul>
142
+ </div>
143
+
144
+
145
+ <div id="classindex-section" class="section project-section">
146
+ <h3 class="section-header">Class Index
147
+ <span class="search-toggle"><img src="../images/find.png"
148
+ height="16" width="16" alt="[+]"
149
+ title="show/hide quicksearch" /></span></h3>
150
+ <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
151
+ <fieldset>
152
+ <legend>Quicksearch</legend>
153
+ <input type="text" name="quicksearch" value=""
154
+ class="quicksearch-field" />
155
+ </fieldset>
156
+ </form>
157
+
158
+ <ul class="link-list">
159
+
160
+ <li><a href="../Log4r.html">Log4r</a></li>
161
+
162
+ <li><a href="../Log4r/BasicFormatter.html">Log4r::BasicFormatter</a></li>
163
+
164
+ <li><a href="../Log4r/ConfigError.html">Log4r::ConfigError</a></li>
165
+
166
+ <li><a href="../Log4r/Configurator.html">Log4r::Configurator</a></li>
167
+
168
+ <li><a href="../Log4r/DateFileOutputter.html">Log4r::DateFileOutputter</a></li>
169
+
170
+ <li><a href="../Log4r/DefaultFormatter.html">Log4r::DefaultFormatter</a></li>
171
+
172
+ <li><a href="../Log4r/EmailOutputter.html">Log4r::EmailOutputter</a></li>
173
+
174
+ <li><a href="../Log4r/FileOutputter.html">Log4r::FileOutputter</a></li>
175
+
176
+ <li><a href="../Log4r/Formatter.html">Log4r::Formatter</a></li>
177
+
178
+ <li><a href="../Log4r/GDC.html">Log4r::GDC</a></li>
179
+
180
+ <li><a href="../Log4r/IOOutputter.html">Log4r::IOOutputter</a></li>
181
+
182
+ <li><a href="../Log4r/Log4jXmlFormatter.html">Log4r::Log4jXmlFormatter</a></li>
183
+
184
+ <li><a href="../Log4r/Log4rTools.html">Log4r::Log4rTools</a></li>
185
+
186
+ <li><a href="../Log4r/LogEvent.html">Log4r::LogEvent</a></li>
187
+
188
+ <li><a href="../Log4r/LogServer.html">Log4r::LogServer</a></li>
189
+
190
+ <li><a href="../Log4r/Logger.html">Log4r::Logger</a></li>
191
+
192
+ <li><a href="../Log4r/MDC.html">Log4r::MDC</a></li>
193
+
194
+ <li><a href="../Log4r/NDC.html">Log4r::NDC</a></li>
195
+
196
+ <li><a href="../Log4r/ObjectFormatter.html">Log4r::ObjectFormatter</a></li>
197
+
198
+ <li><a href="../Log4r/Outputter.html">Log4r::Outputter</a></li>
199
+
200
+ <li><a href="../Log4r/PatternFormatter.html">Log4r::PatternFormatter</a></li>
201
+
202
+ <li><a href="../Log4r/RemoteOutputter.html">Log4r::RemoteOutputter</a></li>
203
+
204
+ <li><a href="../Log4r/RollingFileOutputter.html">Log4r::RollingFileOutputter</a></li>
205
+
206
+ <li><a href="../Log4r/RootLogger.html">Log4r::RootLogger</a></li>
207
+
208
+ <li><a href="../Log4r/SimpleFormatter.html">Log4r::SimpleFormatter</a></li>
209
+
210
+ <li><a href="../Log4r/StderrOutputter.html">Log4r::StderrOutputter</a></li>
211
+
212
+ <li><a href="../Log4r/StdoutOutputter.html">Log4r::StdoutOutputter</a></li>
213
+
214
+ <li><a href="../Log4r/SyslogOutputter.html">Log4r::SyslogOutputter</a></li>
215
+
216
+ <li><a href="../Log4r/UDPOutputter.html">Log4r::UDPOutputter</a></li>
217
+
218
+ <li><a href="../Log4r/YamlConfigurator.html">Log4r::YamlConfigurator</a></li>
219
+
220
+ </ul>
221
+ <div id="no-class-search-results" style="display: none;">No matching classes.</div>
222
+ </div>
223
+
224
+
225
+ </div>
226
+ </div>
227
+
228
+ <div id="documentation">
229
+ <h1 class="class">Log4r::YamlConfigurator</h1>
230
+
231
+ <div id="description">
232
+ <p>
233
+ See <a
234
+ href="../log4r/yamlconfigurator_rb.html">log4r/yamlconfigurator.rb</a>
235
+ </p>
236
+
237
+ </div>
238
+
239
+ <!-- Constants -->
240
+
241
+ <div id="constants-list" class="section">
242
+ <h3 class="section-header">Constants</h3>
243
+ <dl>
244
+
245
+ <dt><a name="ExcludeParams">ExcludeParams</a></dt>
246
+
247
+ <dd class="description missing-docs">(Not documented)</dd>
248
+
249
+
250
+ </dl>
251
+ </div>
252
+
253
+
254
+ <!-- Attributes -->
255
+
256
+
257
+ <!-- Methods -->
258
+
259
+ <div id="public-class-method-details" class="method-section section">
260
+ <h3 class="section-header">Public Class Methods</h3>
261
+
262
+
263
+ <div id="--method" class="method-detail ">
264
+ <a name="M000138"></a>
265
+
266
+ <div class="method-heading">
267
+
268
+ <span class="method-name">[]</span><span
269
+ class="method-args">(param)</span>
270
+ <span class="method-click-advice">click to toggle source</span>
271
+
272
+ </div>
273
+
274
+ <div class="method-description">
275
+
276
+ <p>
277
+ Get a parameter&#8217;s value
278
+ </p>
279
+
280
+
281
+
282
+ <div class="method-source-code"
283
+ id="--source">
284
+ <pre>
285
+ <span class="ruby-comment cmt"># File log4r/yamlconfigurator.rb, line 24</span>
286
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-operator">[]</span>(<span class="ruby-identifier">param</span>); <span class="ruby-ivar">@@params</span>[<span class="ruby-identifier">param</span>] <span class="ruby-keyword kw">end</span></pre>
287
+ </div>
288
+
289
+ </div>
290
+
291
+
292
+ </div>
293
+
294
+
295
+ <div id="--method" class="method-detail ">
296
+ <a name="M000139"></a>
297
+
298
+ <div class="method-heading">
299
+
300
+ <span class="method-name">[]=</span><span
301
+ class="method-args">(param, value)</span>
302
+ <span class="method-click-advice">click to toggle source</span>
303
+
304
+ </div>
305
+
306
+ <div class="method-description">
307
+
308
+ <p>
309
+ Define a parameter with a value
310
+ </p>
311
+
312
+
313
+
314
+ <div class="method-source-code"
315
+ id="--source">
316
+ <pre>
317
+ <span class="ruby-comment cmt"># File log4r/yamlconfigurator.rb, line 26</span>
318
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-operator">[]=</span>(<span class="ruby-identifier">param</span>, <span class="ruby-identifier">value</span>); <span class="ruby-ivar">@@params</span>[<span class="ruby-identifier">param</span>] = <span class="ruby-identifier">value</span> <span class="ruby-keyword kw">end</span></pre>
319
+ </div>
320
+
321
+ </div>
322
+
323
+
324
+ </div>
325
+
326
+
327
+ <div id="custom-levels-method" class="method-detail ">
328
+ <a name="M000140"></a>
329
+
330
+ <div class="method-heading">
331
+
332
+ <span class="method-name">custom_levels</span><span
333
+ class="method-args">( levels)</span>
334
+ <span class="method-click-advice">click to toggle source</span>
335
+
336
+ </div>
337
+
338
+ <div class="method-description">
339
+
340
+ <p class="missing-docs">(Not documented)</p>
341
+
342
+
343
+
344
+ <div class="method-source-code"
345
+ id="custom-levels-source">
346
+ <pre>
347
+ <span class="ruby-comment cmt"># File log4r/yamlconfigurator.rb, line 29</span>
348
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">custom_levels</span>( <span class="ruby-identifier">levels</span>)
349
+ <span class="ruby-keyword kw">return</span> <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">root</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">levels</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
350
+ <span class="ruby-keyword kw">for</span> <span class="ruby-identifier">i</span> <span class="ruby-keyword kw">in</span> <span class="ruby-value">0</span><span class="ruby-operator">...</span><span class="ruby-identifier">levels</span>.<span class="ruby-identifier">size</span>
351
+ <span class="ruby-identifier">name</span> = <span class="ruby-identifier">levels</span>[<span class="ruby-identifier">i</span>].<span class="ruby-identifier">to_s</span>
352
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">name</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/\s/</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">name</span> <span class="ruby-operator">!~</span> <span class="ruby-regexp re">/^[A-Z]/</span>
353
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">TypeError</span>, <span class="ruby-node">&quot;#{name} is not a valid Ruby Constant name&quot;</span>, <span class="ruby-identifier">caller</span>
354
+ <span class="ruby-keyword kw">end</span>
355
+ <span class="ruby-keyword kw">end</span>
356
+ <span class="ruby-constant">Log4r</span>.<span class="ruby-identifier">define_levels</span> <span class="ruby-operator">*</span><span class="ruby-identifier">levels</span>
357
+ <span class="ruby-keyword kw">end</span></pre>
358
+ </div>
359
+
360
+ </div>
361
+
362
+
363
+ </div>
364
+
365
+
366
+ <div id="load-yaml-file-method" class="method-detail ">
367
+ <a name="M000141"></a>
368
+
369
+ <div class="method-heading">
370
+
371
+ <span class="method-name">load_yaml_file</span><span
372
+ class="method-args">( filename)</span>
373
+ <span class="method-click-advice">click to toggle source</span>
374
+
375
+ </div>
376
+
377
+ <div class="method-description">
378
+
379
+ <p>
380
+ Given a filename, loads the YAML configuration for <a
381
+ href="../Log4r.html">Log4r</a>.
382
+ </p>
383
+
384
+
385
+
386
+ <div class="method-source-code"
387
+ id="load-yaml-file-source">
388
+ <pre>
389
+ <span class="ruby-comment cmt"># File log4r/yamlconfigurator.rb, line 41</span>
390
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">load_yaml_file</span>( <span class="ruby-identifier">filename</span>)
391
+ <span class="ruby-identifier">actual_load</span>( <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>( <span class="ruby-identifier">filename</span>))
392
+ <span class="ruby-keyword kw">end</span></pre>
393
+ </div>
394
+
395
+ </div>
396
+
397
+
398
+ </div>
399
+
400
+
401
+ <div id="load-yaml-string-method" class="method-detail ">
402
+ <a name="M000142"></a>
403
+
404
+ <div class="method-heading">
405
+
406
+ <span class="method-name">load_yaml_string</span><span
407
+ class="method-args">( string)</span>
408
+ <span class="method-click-advice">click to toggle source</span>
409
+
410
+ </div>
411
+
412
+ <div class="method-description">
413
+
414
+ <p>
415
+ You can load a String YAML configuration instead of a file.
416
+ </p>
417
+
418
+
419
+
420
+ <div class="method-source-code"
421
+ id="load-yaml-string-source">
422
+ <pre>
423
+ <span class="ruby-comment cmt"># File log4r/yamlconfigurator.rb, line 46</span>
424
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">load_yaml_string</span>( <span class="ruby-identifier">string</span>)
425
+ <span class="ruby-identifier">actual_load</span>( <span class="ruby-identifier">string</span>)
426
+ <span class="ruby-keyword kw">end</span></pre>
427
+ </div>
428
+
429
+ </div>
430
+
431
+
432
+ </div>
433
+
434
+
435
+ </div>
436
+
437
+ <div id="private-class-method-details" class="method-section section">
438
+ <h3 class="section-header">Private Class Methods</h3>
439
+
440
+
441
+ <div id="actual-load-method" class="method-detail ">
442
+ <a name="M000143"></a>
443
+
444
+ <div class="method-heading">
445
+
446
+ <span class="method-name">actual_load</span><span
447
+ class="method-args">( yaml_docs)</span>
448
+ <span class="method-click-advice">click to toggle source</span>
449
+
450
+ </div>
451
+
452
+ <div class="method-description">
453
+
454
+
455
+
456
+
457
+
458
+ <div class="method-source-code"
459
+ id="actual-load-source">
460
+ <pre>
461
+ <span class="ruby-comment cmt"># File log4r/yamlconfigurator.rb, line 54</span>
462
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">actual_load</span>( <span class="ruby-identifier">yaml_docs</span>)
463
+ <span class="ruby-identifier">log4r_config</span> = <span class="ruby-keyword kw">nil</span>
464
+ <span class="ruby-constant">YAML</span>.<span class="ruby-identifier">load_documents</span>( <span class="ruby-identifier">yaml_docs</span>){ <span class="ruby-operator">|</span><span class="ruby-identifier">doc</span><span class="ruby-operator">|</span>
465
+ <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">has_key?</span>( <span class="ruby-value str">'log4r_config'</span>) <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">log4r_config</span> = <span class="ruby-identifier">doc</span>[<span class="ruby-value str">'log4r_config'</span>] <span class="ruby-keyword kw">and</span> <span class="ruby-keyword kw">break</span>
466
+ }
467
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">log4r_config</span>.<span class="ruby-identifier">nil?</span>
468
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">ConfigError</span>,
469
+ <span class="ruby-value str">&quot;Key 'log4r_config:' not defined in yaml documents&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>]
470
+ <span class="ruby-keyword kw">end</span>
471
+ <span class="ruby-identifier">decode_yaml</span>( <span class="ruby-identifier">log4r_config</span>)
472
+ <span class="ruby-keyword kw">end</span></pre>
473
+ </div>
474
+
475
+ </div>
476
+
477
+
478
+ </div>
479
+
480
+
481
+ <div id="decode-custom-levels-method" class="method-detail ">
482
+ <a name="M000146"></a>
483
+
484
+ <div class="method-heading">
485
+
486
+ <span class="method-name">decode_custom_levels</span><span
487
+ class="method-args">( levels)</span>
488
+ <span class="method-click-advice">click to toggle source</span>
489
+
490
+ </div>
491
+
492
+ <div class="method-description">
493
+
494
+ <p class="missing-docs">(Not documented)</p>
495
+
496
+
497
+
498
+ <div class="method-source-code"
499
+ id="decode-custom-levels-source">
500
+ <pre>
501
+ <span class="ruby-comment cmt"># File log4r/yamlconfigurator.rb, line 81</span>
502
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">decode_custom_levels</span>( <span class="ruby-identifier">levels</span>)
503
+ <span class="ruby-keyword kw">return</span> <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">root</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">levels</span>.<span class="ruby-identifier">nil?</span>
504
+ <span class="ruby-keyword kw">begin</span> <span class="ruby-identifier">custom_levels</span>( <span class="ruby-identifier">levels</span>)
505
+ <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">TypeError</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">te</span>
506
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">ConfigError</span>, <span class="ruby-identifier">te</span>.<span class="ruby-identifier">message</span>, <span class="ruby-identifier">caller</span>[<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-4</span>]
507
+ <span class="ruby-keyword kw">end</span>
508
+ <span class="ruby-keyword kw">end</span></pre>
509
+ </div>
510
+
511
+ </div>
512
+
513
+
514
+ </div>
515
+
516
+
517
+ <div id="decode-formatter-method" class="method-detail ">
518
+ <a name="M000150"></a>
519
+
520
+ <div class="method-heading">
521
+
522
+ <span class="method-name">decode_formatter</span><span
523
+ class="method-args">( fo)</span>
524
+ <span class="method-click-advice">click to toggle source</span>
525
+
526
+ </div>
527
+
528
+ <div class="method-description">
529
+
530
+ <p class="missing-docs">(Not documented)</p>
531
+
532
+
533
+
534
+ <div class="method-source-code"
535
+ id="decode-formatter-source">
536
+ <pre>
537
+ <span class="ruby-comment cmt"># File log4r/yamlconfigurator.rb, line 137</span>
538
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">decode_formatter</span>( <span class="ruby-identifier">fo</span>)
539
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">fo</span>.<span class="ruby-identifier">nil?</span>
540
+ <span class="ruby-identifier">type</span> = <span class="ruby-identifier">fo</span>[<span class="ruby-value str">'type'</span>]
541
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">ConfigError</span>, <span class="ruby-value str">&quot;Formatter missing type&quot;</span>, <span class="ruby-identifier">caller</span>[<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-4</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">type</span>.<span class="ruby-identifier">nil?</span>
542
+ <span class="ruby-identifier">buff</span> = <span class="ruby-node">&quot;#{type}.new &quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">decode_hash_params</span>( <span class="ruby-identifier">fo</span>).<span class="ruby-identifier">join</span>(<span class="ruby-value str">','</span>)
543
+ <span class="ruby-keyword kw">begin</span> <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">eval</span>( <span class="ruby-identifier">buff</span>)
544
+ <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">ae</span>
545
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">ConfigError</span>,
546
+ <span class="ruby-node">&quot;Problem creating outputter: #{ae.message}&quot;</span>, <span class="ruby-identifier">caller</span>[<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-4</span>]
547
+ <span class="ruby-keyword kw">end</span>
548
+ <span class="ruby-keyword kw">end</span></pre>
549
+ </div>
550
+
551
+ </div>
552
+
553
+
554
+ </div>
555
+
556
+
557
+ <div id="decode-hash-params-method" class="method-detail ">
558
+ <a name="M000151"></a>
559
+
560
+ <div class="method-heading">
561
+
562
+ <span class="method-name">decode_hash_params</span><span
563
+ class="method-args">( ph)</span>
564
+ <span class="method-click-advice">click to toggle source</span>
565
+
566
+ </div>
567
+
568
+ <div class="method-description">
569
+
570
+ <p>
571
+ Does the fancy parameter to hash argument transformation
572
+ </p>
573
+
574
+
575
+
576
+ <div class="method-source-code"
577
+ id="decode-hash-params-source">
578
+ <pre>
579
+ <span class="ruby-comment cmt"># File log4r/yamlconfigurator.rb, line 152</span>
580
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">decode_hash_params</span>( <span class="ruby-identifier">ph</span>)
581
+ <span class="ruby-identifier">buff</span> = []
582
+ <span class="ruby-identifier">ph</span>.<span class="ruby-identifier">each</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">name</span>, <span class="ruby-identifier">value</span><span class="ruby-operator">|</span>
583
+ <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">ExcludeParams</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">name</span>
584
+ <span class="ruby-identifier">buff</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;:&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">name</span> <span class="ruby-operator">+</span> <span class="ruby-value str">&quot;=&gt;&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">paramsub</span>( <span class="ruby-identifier">value</span>)
585
+ }
586
+ <span class="ruby-identifier">buff</span>
587
+ <span class="ruby-keyword kw">end</span></pre>
588
+ </div>
589
+
590
+ </div>
591
+
592
+
593
+ </div>
594
+
595
+
596
+ <div id="decode-logger-method" class="method-detail ">
597
+ <a name="M000153"></a>
598
+
599
+ <div class="method-heading">
600
+
601
+ <span class="method-name">decode_logger</span><span
602
+ class="method-args">( lo)</span>
603
+ <span class="method-click-advice">click to toggle source</span>
604
+
605
+ </div>
606
+
607
+ <div class="method-description">
608
+
609
+ <p class="missing-docs">(Not documented)</p>
610
+
611
+
612
+
613
+ <div class="method-source-code"
614
+ id="decode-logger-source">
615
+ <pre>
616
+ <span class="ruby-comment cmt"># File log4r/yamlconfigurator.rb, line 171</span>
617
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">decode_logger</span>( <span class="ruby-identifier">lo</span>)
618
+ <span class="ruby-identifier">l</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">lo</span>[<span class="ruby-value str">'name'</span>]
619
+ <span class="ruby-identifier">decode_logger_common</span>( <span class="ruby-identifier">l</span>, <span class="ruby-identifier">lo</span>)
620
+ <span class="ruby-keyword kw">end</span></pre>
621
+ </div>
622
+
623
+ </div>
624
+
625
+
626
+ </div>
627
+
628
+
629
+ <div id="decode-logger-common-method" class="method-detail ">
630
+ <a name="M000155"></a>
631
+
632
+ <div class="method-heading">
633
+
634
+ <span class="method-name">decode_logger_common</span><span
635
+ class="method-args">( l, lo)</span>
636
+ <span class="method-click-advice">click to toggle source</span>
637
+
638
+ </div>
639
+
640
+ <div class="method-description">
641
+
642
+ <p class="missing-docs">(Not documented)</p>
643
+
644
+
645
+
646
+ <div class="method-source-code"
647
+ id="decode-logger-common-source">
648
+ <pre>
649
+ <span class="ruby-comment cmt"># File log4r/yamlconfigurator.rb, line 183</span>
650
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">decode_logger_common</span>( <span class="ruby-identifier">l</span>, <span class="ruby-identifier">lo</span>)
651
+ <span class="ruby-identifier">level</span> = <span class="ruby-identifier">lo</span>[<span class="ruby-value str">'level'</span>]
652
+ <span class="ruby-identifier">additive</span> = <span class="ruby-identifier">lo</span>[<span class="ruby-value str">'additive'</span>]
653
+ <span class="ruby-identifier">trace</span> = <span class="ruby-identifier">lo</span>[<span class="ruby-value str">'trace'</span>]
654
+ <span class="ruby-identifier">l</span>.<span class="ruby-identifier">level</span> = <span class="ruby-constant">LNAMES</span>.<span class="ruby-identifier">index</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>
655
+ <span class="ruby-identifier">l</span>.<span class="ruby-identifier">additive</span> = <span class="ruby-identifier">additive</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">additive</span>.<span class="ruby-identifier">nil?</span>
656
+ <span class="ruby-identifier">l</span>.<span class="ruby-identifier">trace</span> = <span class="ruby-identifier">trace</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">trace</span>.<span class="ruby-identifier">nil?</span>
657
+ <span class="ruby-comment cmt"># and now for outputters</span>
658
+ <span class="ruby-identifier">outs</span> = <span class="ruby-identifier">lo</span>[<span class="ruby-value str">'outputters'</span>]
659
+ <span class="ruby-identifier">outs</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">n</span><span class="ruby-operator">|</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">add</span> <span class="ruby-identifier">n</span>.<span class="ruby-identifier">strip</span>} <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">outs</span>.<span class="ruby-identifier">nil?</span>
660
+ <span class="ruby-keyword kw">end</span></pre>
661
+ </div>
662
+
663
+ </div>
664
+
665
+
666
+ </div>
667
+
668
+
669
+ <div id="decode-logserver-method" class="method-detail ">
670
+ <a name="M000154"></a>
671
+
672
+ <div class="method-heading">
673
+
674
+ <span class="method-name">decode_logserver</span><span
675
+ class="method-args">( lo)</span>
676
+ <span class="method-click-advice">click to toggle source</span>
677
+
678
+ </div>
679
+
680
+ <div class="method-description">
681
+
682
+ <p class="missing-docs">(Not documented)</p>
683
+
684
+
685
+
686
+ <div class="method-source-code"
687
+ id="decode-logserver-source">
688
+ <pre>
689
+ <span class="ruby-comment cmt"># File log4r/yamlconfigurator.rb, line 176</span>
690
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">decode_logserver</span>( <span class="ruby-identifier">lo</span>)
691
+ <span class="ruby-identifier">name</span> = <span class="ruby-identifier">lo</span>[<span class="ruby-value str">'name'</span>]
692
+ <span class="ruby-identifier">uri</span> = <span class="ruby-identifier">lo</span>[<span class="ruby-value str">'uri'</span>]
693
+ <span class="ruby-identifier">l</span> = <span class="ruby-constant">LogServer</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">name</span>, <span class="ruby-identifier">uri</span>
694
+ <span class="ruby-identifier">decode_logger_common</span>(<span class="ruby-identifier">l</span>, <span class="ruby-identifier">lo</span>)
695
+ <span class="ruby-keyword kw">end</span></pre>
696
+ </div>
697
+
698
+ </div>
699
+
700
+
701
+ </div>
702
+
703
+
704
+ <div id="decode-outputter-method" class="method-detail ">
705
+ <a name="M000149"></a>
706
+
707
+ <div class="method-heading">
708
+
709
+ <span class="method-name">decode_outputter</span><span
710
+ class="method-args">( op)</span>
711
+ <span class="method-click-advice">click to toggle source</span>
712
+
713
+ </div>
714
+
715
+ <div class="method-description">
716
+
717
+ <p class="missing-docs">(Not documented)</p>
718
+
719
+
720
+
721
+ <div class="method-source-code"
722
+ id="decode-outputter-source">
723
+ <pre>
724
+ <span class="ruby-comment cmt"># File log4r/yamlconfigurator.rb, line 102</span>
725
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">decode_outputter</span>( <span class="ruby-identifier">op</span>)
726
+ <span class="ruby-comment cmt"># fields</span>
727
+ <span class="ruby-identifier">name</span> = <span class="ruby-identifier">op</span>[<span class="ruby-value str">'name'</span>]
728
+ <span class="ruby-identifier">type</span> = <span class="ruby-identifier">op</span>[<span class="ruby-value str">'type'</span>]
729
+ <span class="ruby-identifier">level</span> = <span class="ruby-identifier">op</span>[<span class="ruby-value str">'level'</span>]
730
+ <span class="ruby-identifier">only_at</span> = <span class="ruby-identifier">op</span>[<span class="ruby-value str">'only_at'</span>]
731
+ <span class="ruby-comment cmt"># validation</span>
732
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">ConfigError</span>, <span class="ruby-value str">&quot;Outputter missing name&quot;</span>, <span class="ruby-identifier">caller</span>[<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-3</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">name</span>.<span class="ruby-identifier">nil?</span>
733
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">ConfigError</span>, <span class="ruby-value str">&quot;Outputter missing type&quot;</span>, <span class="ruby-identifier">caller</span>[<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-3</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">type</span>.<span class="ruby-identifier">nil?</span>
734
+ <span class="ruby-constant">Log4rTools</span>.<span class="ruby-identifier">validate_level</span>(<span class="ruby-constant">LNAMES</span>.<span class="ruby-identifier">index</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>
735
+ <span class="ruby-identifier">only_levels</span> = []
736
+ <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">only_at</span>.<span class="ruby-identifier">nil?</span>
737
+ <span class="ruby-keyword kw">for</span> <span class="ruby-identifier">lev</span> <span class="ruby-keyword kw">in</span> <span class="ruby-identifier">only_at</span>
738
+ <span class="ruby-identifier">alev</span> = <span class="ruby-constant">LNAMES</span>.<span class="ruby-identifier">index</span>(<span class="ruby-identifier">lev</span>)
739
+ <span class="ruby-constant">Log4rTools</span>.<span class="ruby-identifier">validate_level</span>(<span class="ruby-identifier">alev</span>, <span class="ruby-value">3</span>)
740
+ <span class="ruby-identifier">only_levels</span>.<span class="ruby-identifier">push</span> <span class="ruby-identifier">alev</span>
741
+ <span class="ruby-keyword kw">end</span>
742
+ <span class="ruby-keyword kw">end</span>
743
+
744
+ <span class="ruby-identifier">formatter</span> = <span class="ruby-identifier">decode_formatter</span>( <span class="ruby-identifier">op</span>[<span class="ruby-value str">'formatter'</span>])
745
+ <span class="ruby-comment cmt"># build the eval string</span>
746
+ <span class="ruby-identifier">buff</span> = <span class="ruby-node">&quot;Outputter[name] = #{type}.new name&quot;</span>
747
+ <span class="ruby-identifier">buff</span> <span class="ruby-operator">+=</span> <span class="ruby-node">&quot;,:level=&gt;#{LNAMES.index(level)}&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">level</span>.<span class="ruby-identifier">nil?</span>
748
+ <span class="ruby-identifier">buff</span> <span class="ruby-operator">+=</span> <span class="ruby-value str">&quot;,:formatter=&gt;formatter&quot;</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">formatter</span>.<span class="ruby-identifier">nil?</span>
749
+ <span class="ruby-identifier">params</span> = <span class="ruby-identifier">decode_hash_params</span>( <span class="ruby-identifier">op</span>)
750
+ <span class="ruby-identifier">buff</span> <span class="ruby-operator">+=</span> <span class="ruby-value str">&quot;,&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">params</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">','</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">params</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
751
+ <span class="ruby-keyword kw">begin</span> <span class="ruby-identifier">eval</span> <span class="ruby-identifier">buff</span>
752
+ <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">ae</span>
753
+ <span class="ruby-identifier">raise</span> <span class="ruby-constant">ConfigError</span>,
754
+ <span class="ruby-node">&quot;Problem creating outputter: #{ae.message}&quot;</span>, <span class="ruby-identifier">caller</span>[<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-value">-3</span>]
755
+ <span class="ruby-keyword kw">end</span>
756
+ <span class="ruby-constant">Outputter</span>[<span class="ruby-identifier">name</span>].<span class="ruby-identifier">only_at</span>( <span class="ruby-operator">*</span><span class="ruby-identifier">only_levels</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">only_levels</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
757
+ <span class="ruby-constant">Outputter</span>[<span class="ruby-identifier">name</span>]
758
+ <span class="ruby-keyword kw">end</span></pre>
759
+ </div>
760
+
761
+ </div>
762
+
763
+
764
+ </div>
765
+
766
+
767
+ <div id="decode-parameters-method" class="method-detail ">
768
+ <a name="M000148"></a>
769
+
770
+ <div class="method-heading">
771
+
772
+ <span class="method-name">decode_parameters</span><span
773
+ class="method-args">( params)</span>
774
+ <span class="method-click-advice">click to toggle source</span>
775
+
776
+ </div>
777
+
778
+ <div class="method-description">
779
+
780
+ <p class="missing-docs">(Not documented)</p>
781
+
782
+
783
+
784
+ <div class="method-source-code"
785
+ id="decode-parameters-source">
786
+ <pre>
787
+ <span class="ruby-comment cmt"># File log4r/yamlconfigurator.rb, line 98</span>
788
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">decode_parameters</span>( <span class="ruby-identifier">params</span>)
789
+ <span class="ruby-identifier">params</span>.<span class="ruby-identifier">each</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">p</span><span class="ruby-operator">|</span> <span class="ruby-ivar">@@params</span>[<span class="ruby-identifier">p</span>[<span class="ruby-value str">'name'</span>]] = <span class="ruby-identifier">p</span>[<span class="ruby-value str">'value'</span>]} <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">params</span>.<span class="ruby-identifier">nil?</span>
790
+ <span class="ruby-keyword kw">end</span></pre>
791
+ </div>
792
+
793
+ </div>
794
+
795
+
796
+ </div>
797
+
798
+
799
+ <div id="decode-pre-config-method" class="method-detail ">
800
+ <a name="M000145"></a>
801
+
802
+ <div class="method-heading">
803
+
804
+ <span class="method-name">decode_pre_config</span><span
805
+ class="method-args">( pre)</span>
806
+ <span class="method-click-advice">click to toggle source</span>
807
+
808
+ </div>
809
+
810
+ <div class="method-description">
811
+
812
+ <p class="missing-docs">(Not documented)</p>
813
+
814
+
815
+
816
+ <div class="method-source-code"
817
+ id="decode-pre-config-source">
818
+ <pre>
819
+ <span class="ruby-comment cmt"># File log4r/yamlconfigurator.rb, line 73</span>
820
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">decode_pre_config</span>( <span class="ruby-identifier">pre</span>)
821
+ <span class="ruby-keyword kw">return</span> <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">root</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">pre</span>.<span class="ruby-identifier">nil?</span>
822
+ <span class="ruby-identifier">decode_custom_levels</span>( <span class="ruby-identifier">pre</span>[<span class="ruby-value str">'custom_levels'</span>])
823
+ <span class="ruby-identifier">global_config</span>( <span class="ruby-identifier">pre</span>[<span class="ruby-value str">'global'</span>])
824
+ <span class="ruby-identifier">global_config</span>( <span class="ruby-identifier">pre</span>[<span class="ruby-value str">'root'</span>])
825
+ <span class="ruby-identifier">decode_parameters</span>( <span class="ruby-identifier">pre</span>[<span class="ruby-value str">'parameters'</span>])
826
+ <span class="ruby-keyword kw">end</span></pre>
827
+ </div>
828
+
829
+ </div>
830
+
831
+
832
+ </div>
833
+
834
+
835
+ <div id="decode-yaml-method" class="method-detail ">
836
+ <a name="M000144"></a>
837
+
838
+ <div class="method-heading">
839
+
840
+ <span class="method-name">decode_yaml</span><span
841
+ class="method-args">( cfg)</span>
842
+ <span class="method-click-advice">click to toggle source</span>
843
+
844
+ </div>
845
+
846
+ <div class="method-description">
847
+
848
+ <p class="missing-docs">(Not documented)</p>
849
+
850
+
851
+
852
+ <div class="method-source-code"
853
+ id="decode-yaml-source">
854
+ <pre>
855
+ <span class="ruby-comment cmt"># File log4r/yamlconfigurator.rb, line 66</span>
856
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">decode_yaml</span>( <span class="ruby-identifier">cfg</span>)
857
+ <span class="ruby-identifier">decode_pre_config</span>( <span class="ruby-identifier">cfg</span>[<span class="ruby-value str">'pre_config'</span>])
858
+ <span class="ruby-identifier">cfg</span>[<span class="ruby-value str">'outputters'</span>].<span class="ruby-identifier">each</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">op</span><span class="ruby-operator">|</span> <span class="ruby-identifier">decode_outputter</span>( <span class="ruby-identifier">op</span>)}
859
+ <span class="ruby-identifier">cfg</span>[<span class="ruby-value str">'loggers'</span>].<span class="ruby-identifier">each</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">lo</span><span class="ruby-operator">|</span> <span class="ruby-identifier">decode_logger</span>( <span class="ruby-identifier">lo</span>)}
860
+ <span class="ruby-identifier">cfg</span>[<span class="ruby-value str">'logserver'</span>].<span class="ruby-identifier">each</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">lo</span><span class="ruby-operator">|</span> <span class="ruby-identifier">decode_logserver</span>( <span class="ruby-identifier">lo</span>)} <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">cfg</span>[<span class="ruby-value str">'logserver'</span>].<span class="ruby-identifier">nil?</span>
861
+ <span class="ruby-keyword kw">end</span></pre>
862
+ </div>
863
+
864
+ </div>
865
+
866
+
867
+ </div>
868
+
869
+
870
+ <div id="global-config-method" class="method-detail ">
871
+ <a name="M000147"></a>
872
+
873
+ <div class="method-heading">
874
+
875
+ <span class="method-name">global_config</span><span
876
+ class="method-args">( e)</span>
877
+ <span class="method-click-advice">click to toggle source</span>
878
+
879
+ </div>
880
+
881
+ <div class="method-description">
882
+
883
+ <p class="missing-docs">(Not documented)</p>
884
+
885
+
886
+
887
+ <div class="method-source-code"
888
+ id="global-config-source">
889
+ <pre>
890
+ <span class="ruby-comment cmt"># File log4r/yamlconfigurator.rb, line 89</span>
891
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">global_config</span>( <span class="ruby-identifier">e</span>)
892
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">nil?</span>
893
+ <span class="ruby-identifier">globlev</span> = <span class="ruby-identifier">e</span>[<span class="ruby-value str">'level'</span>]
894
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">globlev</span>.<span class="ruby-identifier">nil?</span>
895
+ <span class="ruby-identifier">lev</span> = <span class="ruby-constant">LNAMES</span>.<span class="ruby-identifier">index</span>(<span class="ruby-identifier">globlev</span>) <span class="ruby-comment cmt"># find value in LNAMES</span>
896
+ <span class="ruby-constant">Log4rTools</span>.<span class="ruby-identifier">validate_level</span>(<span class="ruby-identifier">lev</span>, <span class="ruby-value">4</span>) <span class="ruby-comment cmt"># choke on bad level</span>
897
+ <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">global</span>.<span class="ruby-identifier">level</span> = <span class="ruby-identifier">lev</span>
898
+ <span class="ruby-keyword kw">end</span></pre>
899
+ </div>
900
+
901
+ </div>
902
+
903
+
904
+ </div>
905
+
906
+
907
+ <div id="paramsub-method" class="method-detail ">
908
+ <a name="M000152"></a>
909
+
910
+ <div class="method-heading">
911
+
912
+ <span class="method-name">paramsub</span><span
913
+ class="method-args">( str)</span>
914
+ <span class="method-click-advice">click to toggle source</span>
915
+
916
+ </div>
917
+
918
+ <div class="method-description">
919
+
920
+ <p>
921
+ Substitues any #{foo} in the YAML with Parameter[&#8216;foo&#8217;]
922
+ </p>
923
+
924
+
925
+
926
+ <div class="method-source-code"
927
+ id="paramsub-source">
928
+ <pre>
929
+ <span class="ruby-comment cmt"># File log4r/yamlconfigurator.rb, line 162</span>
930
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">paramsub</span>( <span class="ruby-identifier">str</span>)
931
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">str</span>.<span class="ruby-identifier">nil?</span>
932
+ <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">str</span>.<span class="ruby-identifier">class</span> <span class="ruby-operator">!=</span> <span class="ruby-constant">String</span>
933
+ <span class="ruby-ivar">@@params</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">param</span>, <span class="ruby-identifier">value</span><span class="ruby-operator">|</span>
934
+ <span class="ruby-identifier">str</span>.<span class="ruby-identifier">sub!</span>( <span class="ruby-value str">'#{'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">param</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'}'</span>, <span class="ruby-identifier">value</span>)
935
+ }
936
+ <span class="ruby-value str">&quot;'&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">str</span> <span class="ruby-operator">+</span> <span class="ruby-value str">&quot;'&quot;</span>
937
+ <span class="ruby-keyword kw">end</span></pre>
938
+ </div>
939
+
940
+ </div>
941
+
942
+
943
+ </div>
944
+
945
+
946
+ </div>
947
+
948
+
949
+ </div>
950
+
951
+
952
+ <div id="rdoc-debugging-section-dump" class="debugging-section">
953
+
954
+ <p>Disabled; run with --debug to generate this.</p>
955
+
956
+ </div>
957
+
958
+ <div id="validator-badges">
959
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
960
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
961
+ Rdoc Generator</a> 1.1.6</small>.</p>
962
+ </div>
963
+
964
+ </body>
965
+ </html>
966
+