log4r 1.1.2 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (319) hide show
  1. data/README +2 -2
  2. data/Rakefile +3 -3
  3. data/TODO +0 -34
  4. data/examples/filelog.rb +25 -0
  5. data/examples/logs/TestSize000001.log +576 -0
  6. data/examples/logs/TestSize000002.log +567 -0
  7. data/examples/logs/TestSize000003.log +552 -0
  8. data/examples/logs/TestSize000004.log +552 -0
  9. data/examples/logs/TestSize000005.log +552 -0
  10. data/examples/logs/TestSize000006.log +552 -0
  11. data/examples/logs/TestSize000007.log +552 -0
  12. data/examples/logs/TestSize000008.log +552 -0
  13. data/examples/logs/TestSize000009.log +552 -0
  14. data/examples/logs/TestSize000010.log +552 -0
  15. data/examples/logs/TestSize000011.log +552 -0
  16. data/examples/logs/TestSize000012.log +552 -0
  17. data/examples/logs/TestSize000013.log +552 -0
  18. data/examples/logs/TestSize000014.log +552 -0
  19. data/examples/logs/TestSize000015.log +552 -0
  20. data/examples/logs/TestSize000016.log +552 -0
  21. data/examples/logs/TestSize000017.log +552 -0
  22. data/examples/logs/TestSize000018.log +552 -0
  23. data/examples/logs/TestSize000019.log +535 -0
  24. data/examples/logs/TestSize000020.log +534 -0
  25. data/examples/logs/TestSize000021.log +534 -0
  26. data/examples/logs/TestSize000022.log +534 -0
  27. data/examples/logs/TestSize000023.log +534 -0
  28. data/examples/logs/TestSize000024.log +534 -0
  29. data/examples/logs/TestSize000025.log +534 -0
  30. data/examples/logs/TestSize000026.log +534 -0
  31. data/examples/logs/TestSize000027.log +534 -0
  32. data/examples/logs/TestSize000028.log +534 -0
  33. data/examples/logs/TestSize000029.log +534 -0
  34. data/examples/logs/TestSize000030.log +534 -0
  35. data/examples/logs/TestSize000031.log +534 -0
  36. data/examples/logs/TestSize000032.log +534 -0
  37. data/examples/logs/TestSize000033.log +534 -0
  38. data/examples/logs/TestSize000034.log +534 -0
  39. data/examples/logs/TestSize000035.log +534 -0
  40. data/examples/logs/TestSize000036.log +534 -0
  41. data/examples/logs/TestSize000037.log +534 -0
  42. data/examples/logs/TestSize000038.log +534 -0
  43. data/examples/logs/TestSize000039.log +534 -0
  44. data/examples/logs/TestSize000040.log +534 -0
  45. data/examples/logs/TestSize000041.log +534 -0
  46. data/examples/logs/TestSize000042.log +534 -0
  47. data/examples/logs/TestSize000043.log +534 -0
  48. data/examples/logs/TestSize000044.log +534 -0
  49. data/examples/logs/TestSize000045.log +534 -0
  50. data/examples/logs/TestSize000046.log +534 -0
  51. data/examples/logs/TestSize000047.log +534 -0
  52. data/examples/logs/TestSize000048.log +534 -0
  53. data/examples/logs/TestSize000049.log +534 -0
  54. data/examples/logs/TestSize000050.log +534 -0
  55. data/examples/logs/TestSize000051.log +534 -0
  56. data/examples/logs/TestSize000052.log +534 -0
  57. data/examples/logs/TestSize000053.log +534 -0
  58. data/examples/logs/TestSize000054.log +534 -0
  59. data/examples/logs/TestSize000055.log +534 -0
  60. data/examples/logs/TestSize000056.log +534 -0
  61. data/examples/logs/TestSize000057.log +534 -0
  62. data/examples/logs/TestSize000058.log +534 -0
  63. data/examples/logs/TestSize000059.log +534 -0
  64. data/examples/logs/TestSize000060.log +534 -0
  65. data/examples/logs/TestSize000061.log +534 -0
  66. data/examples/logs/TestSize000062.log +534 -0
  67. data/examples/logs/TestSize000063.log +534 -0
  68. data/examples/logs/TestSize000064.log +534 -0
  69. data/examples/logs/TestSize000065.log +534 -0
  70. data/examples/logs/TestSize000066.log +534 -0
  71. data/examples/logs/TestSize000067.log +534 -0
  72. data/examples/logs/TestSize000068.log +534 -0
  73. data/examples/logs/TestSize000069.log +534 -0
  74. data/examples/logs/TestSize000070.log +534 -0
  75. data/examples/logs/TestSize000071.log +534 -0
  76. data/examples/logs/TestSize000072.log +534 -0
  77. data/examples/logs/TestSize000073.log +534 -0
  78. data/examples/logs/TestSize000074.log +534 -0
  79. data/examples/logs/TestSize000075.log +534 -0
  80. data/examples/logs/TestSize000076.log +534 -0
  81. data/examples/logs/TestSize000077.log +534 -0
  82. data/examples/logs/TestSize000078.log +534 -0
  83. data/examples/logs/TestSize000079.log +534 -0
  84. data/examples/logs/TestSize000080.log +534 -0
  85. data/examples/logs/TestSize000081.log +534 -0
  86. data/examples/logs/TestSize000082.log +534 -0
  87. data/examples/logs/TestSize000083.log +534 -0
  88. data/examples/logs/TestSize000084.log +534 -0
  89. data/examples/logs/TestSize000085.log +534 -0
  90. data/examples/logs/TestSize000086.log +534 -0
  91. data/examples/logs/TestSize000087.log +534 -0
  92. data/examples/logs/TestSize000088.log +534 -0
  93. data/examples/logs/TestSize000089.log +534 -0
  94. data/examples/logs/TestSize000090.log +534 -0
  95. data/examples/logs/TestSize000091.log +534 -0
  96. data/examples/logs/TestSize000092.log +534 -0
  97. data/examples/logs/TestSize000093.log +534 -0
  98. data/examples/logs/TestSize000094.log +534 -0
  99. data/examples/logs/TestSize000095.log +534 -0
  100. data/examples/logs/TestSize000096.log +534 -0
  101. data/examples/logs/TestSize000097.log +534 -0
  102. data/examples/logs/TestSize000098.log +534 -0
  103. data/examples/logs/TestSize000099.log +534 -0
  104. data/examples/logs/TestSize000100.log +534 -0
  105. data/examples/logs/TestSize000101.log +534 -0
  106. data/examples/logs/TestSize000102.log +534 -0
  107. data/examples/logs/TestSize000103.log +534 -0
  108. data/examples/logs/TestSize000104.log +534 -0
  109. data/examples/logs/TestSize000105.log +534 -0
  110. data/examples/logs/TestSize000106.log +534 -0
  111. data/examples/logs/TestSize000107.log +534 -0
  112. data/examples/logs/TestSize000108.log +534 -0
  113. data/examples/logs/TestSize000109.log +534 -0
  114. data/examples/logs/TestSize000110.log +534 -0
  115. data/examples/logs/TestSize000111.log +534 -0
  116. data/examples/logs/TestSize000112.log +534 -0
  117. data/examples/logs/TestSize000113.log +534 -0
  118. data/examples/logs/TestSize000114.log +534 -0
  119. data/examples/logs/TestSize000115.log +534 -0
  120. data/examples/logs/TestSize000116.log +534 -0
  121. data/examples/logs/TestSize000117.log +534 -0
  122. data/examples/logs/TestSize000118.log +534 -0
  123. data/examples/logs/TestSize000119.log +534 -0
  124. data/examples/logs/TestSize000120.log +534 -0
  125. data/examples/logs/TestSize000121.log +534 -0
  126. data/examples/logs/TestSize000122.log +534 -0
  127. data/examples/logs/TestSize000123.log +534 -0
  128. data/examples/logs/TestSize000124.log +534 -0
  129. data/examples/logs/TestSize000125.log +534 -0
  130. data/examples/logs/TestSize000126.log +534 -0
  131. data/examples/logs/TestSize000127.log +534 -0
  132. data/examples/logs/TestSize000128.log +534 -0
  133. data/examples/logs/TestSize000129.log +534 -0
  134. data/examples/logs/TestSize000130.log +534 -0
  135. data/examples/logs/TestSize000131.log +534 -0
  136. data/examples/logs/TestSize000132.log +534 -0
  137. data/examples/logs/TestSize000133.log +534 -0
  138. data/examples/logs/TestSize000134.log +534 -0
  139. data/examples/logs/TestSize000135.log +534 -0
  140. data/examples/logs/TestSize000136.log +534 -0
  141. data/examples/logs/TestSize000137.log +534 -0
  142. data/examples/logs/TestSize000138.log +534 -0
  143. data/examples/logs/TestSize000139.log +534 -0
  144. data/examples/logs/TestSize000140.log +534 -0
  145. data/examples/logs/TestSize000141.log +534 -0
  146. data/examples/logs/TestSize000142.log +534 -0
  147. data/examples/logs/TestSize000143.log +534 -0
  148. data/examples/logs/TestSize000144.log +534 -0
  149. data/examples/logs/TestSize000145.log +534 -0
  150. data/examples/logs/TestSize000146.log +534 -0
  151. data/examples/logs/TestSize000147.log +534 -0
  152. data/examples/logs/TestSize000148.log +534 -0
  153. data/examples/logs/TestSize000149.log +534 -0
  154. data/examples/logs/TestSize000150.log +534 -0
  155. data/examples/logs/TestSize000151.log +534 -0
  156. data/examples/logs/TestSize000152.log +534 -0
  157. data/examples/logs/TestSize000153.log +534 -0
  158. data/examples/logs/TestSize000154.log +534 -0
  159. data/examples/logs/TestSize000155.log +534 -0
  160. data/examples/logs/TestSize000156.log +534 -0
  161. data/examples/logs/TestSize000157.log +534 -0
  162. data/examples/logs/TestSize000158.log +534 -0
  163. data/examples/logs/TestSize000159.log +534 -0
  164. data/examples/logs/TestSize000160.log +534 -0
  165. data/examples/logs/TestSize000161.log +534 -0
  166. data/examples/logs/TestSize000162.log +534 -0
  167. data/examples/logs/TestSize000163.log +534 -0
  168. data/examples/logs/TestSize000164.log +534 -0
  169. data/examples/logs/TestSize000165.log +534 -0
  170. data/examples/logs/TestSize000166.log +534 -0
  171. data/examples/logs/TestSize000167.log +534 -0
  172. data/examples/logs/TestSize000168.log +534 -0
  173. data/examples/logs/TestSize000169.log +534 -0
  174. data/examples/logs/TestSize000170.log +534 -0
  175. data/examples/logs/TestSize000171.log +534 -0
  176. data/examples/logs/TestSize000172.log +534 -0
  177. data/examples/logs/TestSize000173.log +534 -0
  178. data/examples/logs/TestSize000174.log +534 -0
  179. data/examples/logs/TestSize000175.log +534 -0
  180. data/examples/logs/TestSize000176.log +534 -0
  181. data/examples/logs/TestSize000177.log +534 -0
  182. data/examples/logs/TestSize000178.log +534 -0
  183. data/examples/logs/TestSize000179.log +534 -0
  184. data/examples/logs/TestSize000180.log +534 -0
  185. data/examples/logs/TestSize000181.log +534 -0
  186. data/examples/logs/TestSize000182.log +534 -0
  187. data/examples/logs/TestSize000183.log +534 -0
  188. data/examples/logs/TestSize000184.log +534 -0
  189. data/examples/logs/TestSize000185.log +534 -0
  190. data/examples/logs/TestSize000186.log +534 -0
  191. data/examples/logs/TestSize000187.log +312 -0
  192. data/examples/logs/TestTime000001.log +11 -0
  193. data/examples/logs/TestTime000002.log +10 -0
  194. data/examples/logs/TestTime000003.log +10 -0
  195. data/examples/logs/TestTime000004.log +10 -0
  196. data/examples/logs/TestTime000005.log +10 -0
  197. data/examples/logs/TestTime000006.log +10 -0
  198. data/examples/logs/TestTime000007.log +10 -0
  199. data/examples/logs/TestTime000008.log +10 -0
  200. data/examples/logs/TestTime000009.log +10 -0
  201. data/examples/logs/TestTime000010.log +9 -0
  202. data/src/log4r.rb +5 -2
  203. data/src/log4r/GDC.rb +40 -0
  204. data/src/log4r/MDC.rb +59 -0
  205. data/src/log4r/NDC.rb +87 -0
  206. data/src/log4r/formatter/patternformatter.rb +11 -6
  207. data/src/log4r/outputter/bob.patch +25 -0
  208. data/src/log4r/outputter/emailoutputter.rb.orig +118 -0
  209. data/src/log4r/outputter/emailoutputter.rb.rej +46 -0
  210. data/src/log4r/outputter/fileoutputter.rb +12 -5
  211. data/src/log4r/outputter/rollingfileoutputter.rb +8 -3
  212. data/src/log4r/outputter/win32eventoutputter.rb +136 -0
  213. data/src/log4r/rdoc/GDC +14 -0
  214. data/src/log4r/rdoc/MDC +16 -0
  215. data/src/log4r/rdoc/NDC +41 -0
  216. data/src/log4r/rdoc/win32eventoutputter +7 -0
  217. data/src/log4r/repository.rb +73 -52
  218. data/src/log4r/yamlconfigurator.rb +0 -0
  219. data/tests/testGDC.rb +26 -0
  220. data/tests/testMDC.rb +21 -0
  221. data/tests/testNDC.rb +27 -0
  222. data/tests/testthreads.rb +23 -0
  223. metadata +215 -98
  224. data/src/doc/Log4r.html +0 -392
  225. data/src/doc/Log4r/BasicFormatter.html +0 -370
  226. data/src/doc/Log4r/ConfigError.html +0 -207
  227. data/src/doc/Log4r/Configurator.html +0 -1050
  228. data/src/doc/Log4r/DateFileOutputter.html +0 -454
  229. data/src/doc/Log4r/DefaultFormatter.html +0 -205
  230. data/src/doc/Log4r/EmailOutputter.html +0 -636
  231. data/src/doc/Log4r/FileOutputter.html +0 -321
  232. data/src/doc/Log4r/Formatter.html +0 -291
  233. data/src/doc/Log4r/IOOutputter.html +0 -392
  234. data/src/doc/Log4r/Log4rConfig.html +0 -193
  235. data/src/doc/Log4r/Log4rTools.html +0 -370
  236. data/src/doc/Log4r/LogEvent.html +0 -360
  237. data/src/doc/Log4r/LogServer.html +0 -322
  238. data/src/doc/Log4r/Logger.html +0 -1132
  239. data/src/doc/Log4r/Logger/LoggerFactory.html +0 -200
  240. data/src/doc/Log4r/Logger/Repository.html +0 -207
  241. data/src/doc/Log4r/ObjectFormatter.html +0 -262
  242. data/src/doc/Log4r/Outputter.html +0 -910
  243. data/src/doc/Log4r/Outputter/OutputterFactory.html +0 -200
  244. data/src/doc/Log4r/Outputter/consoleoutputters_rb.html +0 -57
  245. data/src/doc/Log4r/Outputter/datefileoutputter_rb.html +0 -93
  246. data/src/doc/Log4r/Outputter/emailoutputter_rb.html +0 -179
  247. data/src/doc/Log4r/Outputter/fileoutputter_rb.html +0 -64
  248. data/src/doc/Log4r/Outputter/iooutputter_rb.html +0 -59
  249. data/src/doc/Log4r/Outputter/outputter_rb.html +0 -222
  250. data/src/doc/Log4r/Outputter/outputterfactory_rb.html +0 -62
  251. data/src/doc/Log4r/Outputter/remoteoutputter_rb.html +0 -59
  252. data/src/doc/Log4r/Outputter/rollingfileoutputter_rb.html +0 -66
  253. data/src/doc/Log4r/Outputter/staticoutputter_rb.html +0 -55
  254. data/src/doc/Log4r/Outputter/syslogoutputter_rb.html +0 -110
  255. data/src/doc/Log4r/Outputter/tst_rb.html +0 -54
  256. data/src/doc/Log4r/PatternFormatter.html +0 -422
  257. data/src/doc/Log4r/ROMPClient.html +0 -193
  258. data/src/doc/Log4r/ROMPServer.html +0 -193
  259. data/src/doc/Log4r/RemoteOutputter.html +0 -384
  260. data/src/doc/Log4r/RollingFileOutputter.html +0 -528
  261. data/src/doc/Log4r/RootLogger.html +0 -512
  262. data/src/doc/Log4r/SimpleFormatter.html +0 -258
  263. data/src/doc/Log4r/StderrOutputter.html +0 -250
  264. data/src/doc/Log4r/StdoutOutputter.html +0 -250
  265. data/src/doc/Log4r/SyslogOutputter.html +0 -533
  266. data/src/doc/Log4r/YamlConfigurator.html +0 -948
  267. data/src/doc/Log4r/base_rb.html +0 -57
  268. data/src/doc/Log4r/config_rb.html +0 -76
  269. data/src/doc/Log4r/configurator_rb.html +0 -370
  270. data/src/doc/Log4r/formatter/formatter_rb.html +0 -121
  271. data/src/doc/Log4r/formatter/patternformatter_rb.html +0 -233
  272. data/src/doc/Log4r/lib/drbloader_rb.html +0 -57
  273. data/src/doc/Log4r/lib/xmlloader_rb.html +0 -57
  274. data/src/doc/Log4r/logevent_rb.html +0 -55
  275. data/src/doc/Log4r/logger_rb.html +0 -293
  276. data/src/doc/Log4r/loggerfactory_rb.html +0 -66
  277. data/src/doc/Log4r/logserver_rb.html +0 -161
  278. data/src/doc/Log4r/rdoc/configurator.html +0 -444
  279. data/src/doc/Log4r/rdoc/emailoutputter.html +0 -261
  280. data/src/doc/Log4r/rdoc/formatter.html +0 -200
  281. data/src/doc/Log4r/rdoc/log4r.html +0 -268
  282. data/src/doc/Log4r/rdoc/logger.html +0 -364
  283. data/src/doc/Log4r/rdoc/logserver.html +0 -247
  284. data/src/doc/Log4r/rdoc/outputter.html +0 -295
  285. data/src/doc/Log4r/rdoc/patternformatter.html +0 -313
  286. data/src/doc/Log4r/rdoc/syslogoutputter.html +0 -179
  287. data/src/doc/Log4r/rdoc/yamlconfigurator.html +0 -169
  288. data/src/doc/Log4r/repository_rb.html +0 -62
  289. data/src/doc/Log4r/staticlogger_rb.html +0 -55
  290. data/src/doc/Log4r/yamlconfigurator_rb.html +0 -95
  291. data/src/doc/REXML.html +0 -193
  292. data/src/doc/created.rid +0 -1
  293. data/src/doc/images/brick.png +0 -0
  294. data/src/doc/images/brick_link.png +0 -0
  295. data/src/doc/images/bug.png +0 -0
  296. data/src/doc/images/bullet_black.png +0 -0
  297. data/src/doc/images/bullet_toggle_minus.png +0 -0
  298. data/src/doc/images/bullet_toggle_plus.png +0 -0
  299. data/src/doc/images/date.png +0 -0
  300. data/src/doc/images/find.png +0 -0
  301. data/src/doc/images/loadingAnimation.gif +0 -0
  302. data/src/doc/images/macFFBgHack.png +0 -0
  303. data/src/doc/images/package.png +0 -0
  304. data/src/doc/images/page_green.png +0 -0
  305. data/src/doc/images/page_white_text.png +0 -0
  306. data/src/doc/images/page_white_width.png +0 -0
  307. data/src/doc/images/plugin.png +0 -0
  308. data/src/doc/images/ruby.png +0 -0
  309. data/src/doc/images/tag_green.png +0 -0
  310. data/src/doc/images/wrench.png +0 -0
  311. data/src/doc/images/wrench_orange.png +0 -0
  312. data/src/doc/images/zoom.png +0 -0
  313. data/src/doc/index.html +0 -384
  314. data/src/doc/js/darkfish.js +0 -116
  315. data/src/doc/js/jquery.js +0 -32
  316. data/src/doc/js/quicksearch.js +0 -114
  317. data/src/doc/js/thickbox-compressed.js +0 -10
  318. data/src/doc/rdoc.css +0 -696
  319. data/src/log4r/outputter/tst.rb +0 -8
@@ -1,1050 +0,0 @@
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::Configurator</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/configurator_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
32
- class="thickbox" title="log4r/configurator.rb">log4r/configurator.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="#M000011">::[]</a></li>
63
-
64
- <li><a href="#M000012">::[]=</a></li>
65
-
66
- <li><a href="#M000019">::actual_load</a></li>
67
-
68
- <li><a href="#M000014">::custom_levels</a></li>
69
-
70
- <li><a href="#M000022">::decode_custom_levels</a></li>
71
-
72
- <li><a href="#M000027">::decode_formatter</a></li>
73
-
74
- <li><a href="#M000028">::decode_hash_params</a></li>
75
-
76
- <li><a href="#M000030">::decode_logger</a></li>
77
-
78
- <li><a href="#M000032">::decode_logger_common</a></li>
79
-
80
- <li><a href="#M000031">::decode_logserver</a></li>
81
-
82
- <li><a href="#M000026">::decode_outputter</a></li>
83
-
84
- <li><a href="#M000025">::decode_parameter</a></li>
85
-
86
- <li><a href="#M000024">::decode_parameters</a></li>
87
-
88
- <li><a href="#M000021">::decode_pre_config</a></li>
89
-
90
- <li><a href="#M000020">::decode_xml</a></li>
91
-
92
- <li><a href="#M000018">::detect_rexml</a></li>
93
-
94
- <li><a href="#M000023">::global_config</a></li>
95
-
96
- <li><a href="#M000015">::load_xml_file</a></li>
97
-
98
- <li><a href="#M000017">::load_xml_string</a></li>
99
-
100
- <li><a href="#M000029">::paramsub</a></li>
101
-
102
- </ul>
103
- </div>
104
-
105
-
106
- <!-- Included Modules -->
107
-
108
- <div id="includes-section" class="section">
109
- <h3 class="section-header">Included Modules</h3>
110
- <ul class="link-list">
111
-
112
-
113
- <li><a class="include" href="../REXML.html">REXML</a></li>
114
-
115
-
116
- </ul>
117
- </div>
118
-
119
- </div>
120
-
121
- <div id="project-metadata">
122
-
123
-
124
- <div id="fileindex-section" class="section project-section">
125
- <h3 class="section-header">Files</h3>
126
- <ul>
127
-
128
- <li class="file"><a href="../log4r/rdoc/configurator.html">configurator</a></li>
129
-
130
- <li class="file"><a href="../log4r/rdoc/emailoutputter.html">emailoutputter</a></li>
131
-
132
- <li class="file"><a href="../log4r/rdoc/formatter.html">formatter</a></li>
133
-
134
- <li class="file"><a href="../log4r/rdoc/log4r.html">log4r</a></li>
135
-
136
- <li class="file"><a href="../log4r/rdoc/logger.html">logger</a></li>
137
-
138
- <li class="file"><a href="../log4r/rdoc/logserver.html">logserver</a></li>
139
-
140
- <li class="file"><a href="../log4r/rdoc/outputter.html">outputter</a></li>
141
-
142
- <li class="file"><a href="../log4r/rdoc/patternformatter.html">patternformatter</a></li>
143
-
144
- <li class="file"><a href="../log4r/rdoc/syslogoutputter.html">syslogoutputter</a></li>
145
-
146
- <li class="file"><a href="../log4r/rdoc/yamlconfigurator.html">yamlconfigurator</a></li>
147
-
148
- </ul>
149
- </div>
150
-
151
-
152
- <div id="classindex-section" class="section project-section">
153
- <h3 class="section-header">Class Index
154
- <span class="search-toggle"><img src="../images/find.png"
155
- height="16" width="16" alt="[+]"
156
- title="show/hide quicksearch" /></span></h3>
157
- <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
158
- <fieldset>
159
- <legend>Quicksearch</legend>
160
- <input type="text" name="quicksearch" value=""
161
- class="quicksearch-field" />
162
- </fieldset>
163
- </form>
164
-
165
- <ul class="link-list">
166
-
167
- <li><a href="../Log4r.html">Log4r</a></li>
168
-
169
- <li><a href="../Log4r/BasicFormatter.html">Log4r::BasicFormatter</a></li>
170
-
171
- <li><a href="../Log4r/ConfigError.html">Log4r::ConfigError</a></li>
172
-
173
- <li><a href="../Log4r/Configurator.html">Log4r::Configurator</a></li>
174
-
175
- <li><a href="../Log4r/DateFileOutputter.html">Log4r::DateFileOutputter</a></li>
176
-
177
- <li><a href="../Log4r/DefaultFormatter.html">Log4r::DefaultFormatter</a></li>
178
-
179
- <li><a href="../Log4r/EmailOutputter.html">Log4r::EmailOutputter</a></li>
180
-
181
- <li><a href="../Log4r/FileOutputter.html">Log4r::FileOutputter</a></li>
182
-
183
- <li><a href="../Log4r/Formatter.html">Log4r::Formatter</a></li>
184
-
185
- <li><a href="../Log4r/IOOutputter.html">Log4r::IOOutputter</a></li>
186
-
187
- <li><a href="../Log4r/Log4rTools.html">Log4r::Log4rTools</a></li>
188
-
189
- <li><a href="../Log4r/LogEvent.html">Log4r::LogEvent</a></li>
190
-
191
- <li><a href="../Log4r/LogServer.html">Log4r::LogServer</a></li>
192
-
193
- <li><a href="../Log4r/Logger.html">Log4r::Logger</a></li>
194
-
195
- <li><a href="../Log4r/ObjectFormatter.html">Log4r::ObjectFormatter</a></li>
196
-
197
- <li><a href="../Log4r/Outputter.html">Log4r::Outputter</a></li>
198
-
199
- <li><a href="../Log4r/PatternFormatter.html">Log4r::PatternFormatter</a></li>
200
-
201
- <li><a href="../Log4r/RemoteOutputter.html">Log4r::RemoteOutputter</a></li>
202
-
203
- <li><a href="../Log4r/RollingFileOutputter.html">Log4r::RollingFileOutputter</a></li>
204
-
205
- <li><a href="../Log4r/RootLogger.html">Log4r::RootLogger</a></li>
206
-
207
- <li><a href="../Log4r/SimpleFormatter.html">Log4r::SimpleFormatter</a></li>
208
-
209
- <li><a href="../Log4r/StderrOutputter.html">Log4r::StderrOutputter</a></li>
210
-
211
- <li><a href="../Log4r/StdoutOutputter.html">Log4r::StdoutOutputter</a></li>
212
-
213
- <li><a href="../Log4r/SyslogOutputter.html">Log4r::SyslogOutputter</a></li>
214
-
215
- <li><a href="../Log4r/YamlConfigurator.html">Log4r::YamlConfigurator</a></li>
216
-
217
- </ul>
218
- <div id="no-class-search-results" style="display: none;">No matching classes.</div>
219
- </div>
220
-
221
-
222
- </div>
223
- </div>
224
-
225
- <div id="documentation">
226
- <h1 class="class">Log4r::Configurator</h1>
227
-
228
- <div id="description">
229
- <p>
230
- See <a href="../log4r/configurator_rb.html">log4r/configurator.rb</a>
231
- </p>
232
-
233
- </div>
234
-
235
- <!-- Constants -->
236
-
237
- <div id="constants-list" class="section">
238
- <h3 class="section-header">Constants</h3>
239
- <dl>
240
-
241
- <dt><a name="ExcludeParams">ExcludeParams</a></dt>
242
-
243
- <dd class="description missing-docs">(Not documented)</dd>
244
-
245
-
246
- </dl>
247
- </div>
248
-
249
-
250
- <!-- Attributes -->
251
-
252
-
253
- <!-- Methods -->
254
-
255
- <div id="public-class-method-details" class="method-section section">
256
- <h3 class="section-header">Public Class Methods</h3>
257
-
258
-
259
- <div id="--method" class="method-detail ">
260
- <a name="M000011"></a>
261
-
262
- <div class="method-heading">
263
-
264
- <span class="method-name">[]</span><span
265
- class="method-args">(param)</span>
266
- <span class="method-click-advice">click to toggle source</span>
267
-
268
- </div>
269
-
270
- <div class="method-description">
271
-
272
- <p>
273
- Get a parameter&#8217;s value
274
- </p>
275
-
276
-
277
-
278
- <div class="method-source-code"
279
- id="--source">
280
- <pre>
281
- <span class="ruby-comment cmt"># File log4r/configurator.rb, line 25</span>
282
- <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>
283
- </div>
284
-
285
- </div>
286
-
287
-
288
- </div>
289
-
290
-
291
- <div id="--method" class="method-detail ">
292
- <a name="M000012"></a>
293
-
294
- <div class="method-heading">
295
-
296
- <span class="method-name">[]=</span><span
297
- class="method-args">(param, value)</span>
298
- <span class="method-click-advice">click to toggle source</span>
299
-
300
- </div>
301
-
302
- <div class="method-description">
303
-
304
- <p>
305
- Define a parameter with a value
306
- </p>
307
-
308
-
309
-
310
- <div class="method-source-code"
311
- id="--source">
312
- <pre>
313
- <span class="ruby-comment cmt"># File log4r/configurator.rb, line 27</span>
314
- <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>
315
- </div>
316
-
317
- </div>
318
-
319
-
320
- </div>
321
-
322
-
323
- <div id="custom-levels-method" class="method-detail ">
324
- <a name="M000014"></a>
325
-
326
- <div class="method-heading">
327
-
328
- <span class="method-name">custom_levels</span><span
329
- class="method-args">(*levels)</span>
330
- <span class="method-click-advice">click to toggle source</span>
331
-
332
- </div>
333
-
334
- <div class="method-description">
335
-
336
- <p>
337
- Sets the custom levels. This method accepts symbols or strings.
338
- </p>
339
- <pre>
340
- Configurator.custom_levels('My', 'Custom', :Levels)
341
- </pre>
342
- <p>
343
- Alternatively, you can specify custom levels in XML:
344
- </p>
345
- <pre>
346
- &lt;log4r_config&gt;
347
- &lt;pre_config&gt;
348
- &lt;custom_levels&gt;
349
- My, Custom, Levels
350
- &lt;/custom_levels&gt;
351
- ...
352
- </pre>
353
-
354
-
355
-
356
- <div class="method-source-code"
357
- id="custom-levels-source">
358
- <pre>
359
- <span class="ruby-comment cmt"># File log4r/configurator.rb, line 42</span>
360
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">custom_levels</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">levels</span>)
361
- <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>
362
- <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>
363
- <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>
364
- <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>
365
- <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>
366
- <span class="ruby-keyword kw">end</span>
367
- <span class="ruby-keyword kw">end</span>
368
- <span class="ruby-constant">Log4r</span>.<span class="ruby-identifier">define_levels</span> <span class="ruby-operator">*</span><span class="ruby-identifier">levels</span>
369
- <span class="ruby-keyword kw">end</span></pre>
370
- </div>
371
-
372
- </div>
373
-
374
-
375
- </div>
376
-
377
-
378
- <div id="load-xml-file-method" class="method-detail ">
379
- <a name="M000015"></a>
380
-
381
- <div class="method-heading">
382
-
383
- <span class="method-name">load_xml_file</span><span
384
- class="method-args">(filename)</span>
385
- <span class="method-click-advice">click to toggle source</span>
386
-
387
- </div>
388
-
389
- <div class="method-description">
390
-
391
- <p>
392
- Given a filename, loads the XML configuration for <a
393
- href="../Log4r.html">Log4r</a>.
394
- </p>
395
-
396
-
397
-
398
- <div class="method-source-code"
399
- id="load-xml-file-source">
400
- <pre>
401
- <span class="ruby-comment cmt"># File log4r/configurator.rb, line 54</span>
402
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">load_xml_file</span>(<span class="ruby-identifier">filename</span>)
403
- <span class="ruby-identifier">detect_rexml</span>
404
- <span class="ruby-identifier">actual_load</span> <span class="ruby-constant">Document</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">filename</span>))
405
- <span class="ruby-keyword kw">end</span></pre>
406
- </div>
407
-
408
- </div>
409
-
410
-
411
- </div>
412
-
413
-
414
- <div id="load-xml-string-method" class="method-detail ">
415
- <a name="M000017"></a>
416
-
417
- <div class="method-heading">
418
-
419
- <span class="method-name">load_xml_string</span><span
420
- class="method-args">(string)</span>
421
- <span class="method-click-advice">click to toggle source</span>
422
-
423
- </div>
424
-
425
- <div class="method-description">
426
-
427
- <p>
428
- You can load a String XML configuration instead of a file.
429
- </p>
430
-
431
-
432
-
433
- <div class="method-source-code"
434
- id="load-xml-string-source">
435
- <pre>
436
- <span class="ruby-comment cmt"># File log4r/configurator.rb, line 60</span>
437
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">load_xml_string</span>(<span class="ruby-identifier">string</span>)
438
- <span class="ruby-identifier">detect_rexml</span>
439
- <span class="ruby-identifier">actual_load</span> <span class="ruby-constant">Document</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">string</span>)
440
- <span class="ruby-keyword kw">end</span></pre>
441
- </div>
442
-
443
- </div>
444
-
445
-
446
- </div>
447
-
448
-
449
- </div>
450
-
451
- <div id="private-class-method-details" class="method-section section">
452
- <h3 class="section-header">Private Class Methods</h3>
453
-
454
-
455
- <div id="actual-load-method" class="method-detail ">
456
- <a name="M000019"></a>
457
-
458
- <div class="method-heading">
459
-
460
- <span class="method-name">actual_load</span><span
461
- class="method-args">(doc)</span>
462
- <span class="method-click-advice">click to toggle source</span>
463
-
464
- </div>
465
-
466
- <div class="method-description">
467
-
468
- <p class="missing-docs">(Not documented)</p>
469
-
470
-
471
-
472
- <div class="method-source-code"
473
- id="actual-load-source">
474
- <pre>
475
- <span class="ruby-comment cmt"># File log4r/configurator.rb, line 76</span>
476
- <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">doc</span>)
477
- <span class="ruby-identifier">confignode</span> = <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">elements</span>[<span class="ruby-value str">'//log4r_config'</span>]
478
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">confignode</span>.<span class="ruby-identifier">nil?</span>
479
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">ConfigError</span>,
480
- <span class="ruby-value str">&quot;&lt;log4r_config&gt; element not defined&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>]
481
- <span class="ruby-keyword kw">end</span>
482
- <span class="ruby-identifier">decode_xml</span>(<span class="ruby-identifier">confignode</span>)
483
- <span class="ruby-keyword kw">end</span></pre>
484
- </div>
485
-
486
- </div>
487
-
488
-
489
- </div>
490
-
491
-
492
- <div id="decode-custom-levels-method" class="method-detail ">
493
- <a name="M000022"></a>
494
-
495
- <div class="method-heading">
496
-
497
- <span class="method-name">decode_custom_levels</span><span
498
- class="method-args">(e)</span>
499
- <span class="method-click-advice">click to toggle source</span>
500
-
501
- </div>
502
-
503
- <div class="method-description">
504
-
505
- <p class="missing-docs">(Not documented)</p>
506
-
507
-
508
-
509
- <div class="method-source-code"
510
- id="decode-custom-levels-source">
511
- <pre>
512
- <span class="ruby-comment cmt"># File log4r/configurator.rb, line 101</span>
513
- <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">e</span>)
514
- <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">e</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">text</span>.<span class="ruby-identifier">nil?</span>
515
- <span class="ruby-keyword kw">begin</span> <span class="ruby-identifier">custom_levels</span> <span class="ruby-operator">*</span><span class="ruby-constant">Log4rTools</span>.<span class="ruby-identifier">comma_split</span>(<span class="ruby-identifier">e</span>.<span class="ruby-identifier">text</span>)
516
- <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>
517
- <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>]
518
- <span class="ruby-keyword kw">end</span>
519
- <span class="ruby-keyword kw">end</span></pre>
520
- </div>
521
-
522
- </div>
523
-
524
-
525
- </div>
526
-
527
-
528
- <div id="decode-formatter-method" class="method-detail ">
529
- <a name="M000027"></a>
530
-
531
- <div class="method-heading">
532
-
533
- <span class="method-name">decode_formatter</span><span
534
- class="method-args">(e)</span>
535
- <span class="method-click-advice">click to toggle source</span>
536
-
537
- </div>
538
-
539
- <div class="method-description">
540
-
541
- <p class="missing-docs">(Not documented)</p>
542
-
543
-
544
-
545
- <div class="method-source-code"
546
- id="decode-formatter-source">
547
- <pre>
548
- <span class="ruby-comment cmt"># File log4r/configurator.rb, line 160</span>
549
- <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">e</span>)
550
- <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">e</span>.<span class="ruby-identifier">nil?</span>
551
- <span class="ruby-identifier">type</span> = <span class="ruby-identifier">e</span>.<span class="ruby-identifier">value_of</span> <span class="ruby-value str">'type'</span>
552
- <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>
553
- <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">e</span>).<span class="ruby-identifier">join</span>(<span class="ruby-value str">','</span>)
554
- <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>)
555
- <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>
556
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">ConfigError</span>,
557
- <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>]
558
- <span class="ruby-keyword kw">end</span>
559
- <span class="ruby-keyword kw">end</span></pre>
560
- </div>
561
-
562
- </div>
563
-
564
-
565
- </div>
566
-
567
-
568
- <div id="decode-hash-params-method" class="method-detail ">
569
- <a name="M000028"></a>
570
-
571
- <div class="method-heading">
572
-
573
- <span class="method-name">decode_hash_params</span><span
574
- class="method-args">(e)</span>
575
- <span class="method-click-advice">click to toggle source</span>
576
-
577
- </div>
578
-
579
- <div class="method-description">
580
-
581
- <p>
582
- Does the fancy parameter to hash argument transformation
583
- </p>
584
-
585
-
586
-
587
- <div class="method-source-code"
588
- id="decode-hash-params-source">
589
- <pre>
590
- <span class="ruby-comment cmt"># File log4r/configurator.rb, line 175</span>
591
- <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">e</span>)
592
- <span class="ruby-identifier">buff</span> = []
593
- <span class="ruby-identifier">e</span>.<span class="ruby-identifier">attributes</span>.<span class="ruby-identifier">each_attribute</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">p</span><span class="ruby-operator">|</span>
594
- <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">p</span>.<span class="ruby-identifier">name</span>
595
- <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">p</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">p</span>.<span class="ruby-identifier">value</span>)
596
- }
597
- <span class="ruby-identifier">e</span>.<span class="ruby-identifier">elements</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">p</span><span class="ruby-operator">|</span>
598
- <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">p</span>.<span class="ruby-identifier">name</span>
599
- <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">p</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">p</span>.<span class="ruby-identifier">text</span>)
600
- }
601
- <span class="ruby-identifier">buff</span>
602
- <span class="ruby-keyword kw">end</span></pre>
603
- </div>
604
-
605
- </div>
606
-
607
-
608
- </div>
609
-
610
-
611
- <div id="decode-logger-method" class="method-detail ">
612
- <a name="M000030"></a>
613
-
614
- <div class="method-heading">
615
-
616
- <span class="method-name">decode_logger</span><span
617
- class="method-args">(e)</span>
618
- <span class="method-click-advice">click to toggle source</span>
619
-
620
- </div>
621
-
622
- <div class="method-description">
623
-
624
- <p class="missing-docs">(Not documented)</p>
625
-
626
-
627
-
628
- <div class="method-source-code"
629
- id="decode-logger-source">
630
- <pre>
631
- <span class="ruby-comment cmt"># File log4r/configurator.rb, line 195</span>
632
- <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">e</span>)
633
- <span class="ruby-identifier">l</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">value_of</span>(<span class="ruby-value str">'name'</span>)
634
- <span class="ruby-identifier">decode_logger_common</span>(<span class="ruby-identifier">l</span>, <span class="ruby-identifier">e</span>)
635
- <span class="ruby-keyword kw">end</span></pre>
636
- </div>
637
-
638
- </div>
639
-
640
-
641
- </div>
642
-
643
-
644
- <div id="decode-logger-common-method" class="method-detail ">
645
- <a name="M000032"></a>
646
-
647
- <div class="method-heading">
648
-
649
- <span class="method-name">decode_logger_common</span><span
650
- class="method-args">(l, e)</span>
651
- <span class="method-click-advice">click to toggle source</span>
652
-
653
- </div>
654
-
655
- <div class="method-description">
656
-
657
- <p class="missing-docs">(Not documented)</p>
658
-
659
-
660
-
661
- <div class="method-source-code"
662
- id="decode-logger-common-source">
663
- <pre>
664
- <span class="ruby-comment cmt"># File log4r/configurator.rb, line 208</span>
665
- <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">e</span>)
666
- <span class="ruby-identifier">level</span> = <span class="ruby-identifier">e</span>.<span class="ruby-identifier">value_of</span> <span class="ruby-value str">'level'</span>
667
- <span class="ruby-identifier">additive</span> = <span class="ruby-identifier">e</span>.<span class="ruby-identifier">value_of</span> <span class="ruby-value str">'additive'</span>
668
- <span class="ruby-identifier">trace</span> = <span class="ruby-identifier">e</span>.<span class="ruby-identifier">value_of</span> <span class="ruby-value str">'trace'</span>
669
- <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>
670
- <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>
671
- <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>
672
- <span class="ruby-comment cmt"># and now for outputters</span>
673
- <span class="ruby-identifier">outs</span> = <span class="ruby-identifier">e</span>.<span class="ruby-identifier">value_of</span> <span class="ruby-value str">'outputters'</span>
674
- <span class="ruby-constant">Log4rTools</span>.<span class="ruby-identifier">comma_split</span>(<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>
675
- <span class="ruby-identifier">e</span>.<span class="ruby-identifier">elements</span>.<span class="ruby-identifier">each</span>(<span class="ruby-value str">'outputter'</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span>
676
- <span class="ruby-identifier">name</span> = (<span class="ruby-identifier">e</span>.<span class="ruby-identifier">value_of</span> <span class="ruby-value str">'name'</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">text</span>)
677
- <span class="ruby-identifier">l</span>.<span class="ruby-identifier">add</span> <span class="ruby-constant">Outputter</span>[<span class="ruby-identifier">name</span>]
678
- }
679
- <span class="ruby-keyword kw">end</span></pre>
680
- </div>
681
-
682
- </div>
683
-
684
-
685
- </div>
686
-
687
-
688
- <div id="decode-logserver-method" class="method-detail ">
689
- <a name="M000031"></a>
690
-
691
- <div class="method-heading">
692
-
693
- <span class="method-name">decode_logserver</span><span
694
- class="method-args">(e)</span>
695
- <span class="method-click-advice">click to toggle source</span>
696
-
697
- </div>
698
-
699
- <div class="method-description">
700
-
701
- <p class="missing-docs">(Not documented)</p>
702
-
703
-
704
-
705
- <div class="method-source-code"
706
- id="decode-logserver-source">
707
- <pre>
708
- <span class="ruby-comment cmt"># File log4r/configurator.rb, line 200</span>
709
- <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">e</span>)
710
- <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">HAVE_REXML</span>
711
- <span class="ruby-identifier">name</span> = <span class="ruby-identifier">e</span>.<span class="ruby-identifier">value_of</span> <span class="ruby-value str">'name'</span>
712
- <span class="ruby-identifier">uri</span> = <span class="ruby-identifier">e</span>.<span class="ruby-identifier">value_of</span> <span class="ruby-value str">'uri'</span>
713
- <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>
714
- <span class="ruby-identifier">decode_logger_common</span>(<span class="ruby-identifier">l</span>, <span class="ruby-identifier">e</span>)
715
- <span class="ruby-keyword kw">end</span></pre>
716
- </div>
717
-
718
- </div>
719
-
720
-
721
- </div>
722
-
723
-
724
- <div id="decode-outputter-method" class="method-detail ">
725
- <a name="M000026"></a>
726
-
727
- <div class="method-heading">
728
-
729
- <span class="method-name">decode_outputter</span><span
730
- class="method-args">(e)</span>
731
- <span class="method-click-advice">click to toggle source</span>
732
-
733
- </div>
734
-
735
- <div class="method-description">
736
-
737
- <p class="missing-docs">(Not documented)</p>
738
-
739
-
740
-
741
- <div class="method-source-code"
742
- id="decode-outputter-source">
743
- <pre>
744
- <span class="ruby-comment cmt"># File log4r/configurator.rb, line 126</span>
745
- <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">e</span>)
746
- <span class="ruby-comment cmt"># fields</span>
747
- <span class="ruby-identifier">name</span> = <span class="ruby-identifier">e</span>.<span class="ruby-identifier">value_of</span> <span class="ruby-value str">'name'</span>
748
- <span class="ruby-identifier">type</span> = <span class="ruby-identifier">e</span>.<span class="ruby-identifier">value_of</span> <span class="ruby-value str">'type'</span>
749
- <span class="ruby-identifier">level</span> = <span class="ruby-identifier">e</span>.<span class="ruby-identifier">value_of</span> <span class="ruby-value str">'level'</span>
750
- <span class="ruby-identifier">only_at</span> = <span class="ruby-identifier">e</span>.<span class="ruby-identifier">value_of</span> <span class="ruby-value str">'only_at'</span>
751
- <span class="ruby-comment cmt"># validation</span>
752
- <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>
753
- <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>
754
- <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>
755
- <span class="ruby-identifier">only_levels</span> = []
756
- <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">only_at</span>.<span class="ruby-identifier">nil?</span>
757
- <span class="ruby-keyword kw">for</span> <span class="ruby-identifier">lev</span> <span class="ruby-keyword kw">in</span> <span class="ruby-constant">Log4rTools</span>.<span class="ruby-identifier">comma_split</span>(<span class="ruby-identifier">only_at</span>)
758
- <span class="ruby-identifier">alev</span> = <span class="ruby-constant">LNAMES</span>.<span class="ruby-identifier">index</span>(<span class="ruby-identifier">lev</span>)
759
- <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>)
760
- <span class="ruby-identifier">only_levels</span>.<span class="ruby-identifier">push</span> <span class="ruby-identifier">alev</span>
761
- <span class="ruby-keyword kw">end</span>
762
- <span class="ruby-keyword kw">end</span>
763
- <span class="ruby-identifier">formatter</span> = <span class="ruby-identifier">decode_formatter</span>(<span class="ruby-identifier">e</span>.<span class="ruby-identifier">elements</span>[<span class="ruby-value str">'formatter'</span>])
764
- <span class="ruby-comment cmt"># build the eval string</span>
765
- <span class="ruby-identifier">buff</span> = <span class="ruby-node">&quot;Outputter[name] = #{type}.new name&quot;</span>
766
- <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>
767
- <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>
768
- <span class="ruby-identifier">params</span> = <span class="ruby-identifier">decode_hash_params</span>(<span class="ruby-identifier">e</span>)
769
- <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>
770
- <span class="ruby-keyword kw">begin</span> <span class="ruby-identifier">eval</span> <span class="ruby-identifier">buff</span>
771
- <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>
772
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">ConfigError</span>,
773
- <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>]
774
- <span class="ruby-keyword kw">end</span>
775
- <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>
776
- <span class="ruby-constant">Outputter</span>[<span class="ruby-identifier">name</span>]
777
- <span class="ruby-keyword kw">end</span></pre>
778
- </div>
779
-
780
- </div>
781
-
782
-
783
- </div>
784
-
785
-
786
- <div id="decode-parameter-method" class="method-detail ">
787
- <a name="M000025"></a>
788
-
789
- <div class="method-heading">
790
-
791
- <span class="method-name">decode_parameter</span><span
792
- class="method-args">(e)</span>
793
- <span class="method-click-advice">click to toggle source</span>
794
-
795
- </div>
796
-
797
- <div class="method-description">
798
-
799
- <p class="missing-docs">(Not documented)</p>
800
-
801
-
802
-
803
- <div class="method-source-code"
804
- id="decode-parameter-source">
805
- <pre>
806
- <span class="ruby-comment cmt"># File log4r/configurator.rb, line 122</span>
807
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">decode_parameter</span>(<span class="ruby-identifier">e</span>)
808
- <span class="ruby-ivar">@@params</span>[<span class="ruby-identifier">e</span>.<span class="ruby-identifier">value_of</span>(<span class="ruby-value str">'name'</span>)] = <span class="ruby-identifier">e</span>.<span class="ruby-identifier">value_of</span> <span class="ruby-value str">'value'</span>
809
- <span class="ruby-keyword kw">end</span></pre>
810
- </div>
811
-
812
- </div>
813
-
814
-
815
- </div>
816
-
817
-
818
- <div id="decode-parameters-method" class="method-detail ">
819
- <a name="M000024"></a>
820
-
821
- <div class="method-heading">
822
-
823
- <span class="method-name">decode_parameters</span><span
824
- class="method-args">(e)</span>
825
- <span class="method-click-advice">click to toggle source</span>
826
-
827
- </div>
828
-
829
- <div class="method-description">
830
-
831
- <p class="missing-docs">(Not documented)</p>
832
-
833
-
834
-
835
- <div class="method-source-code"
836
- id="decode-parameters-source">
837
- <pre>
838
- <span class="ruby-comment cmt"># File log4r/configurator.rb, line 118</span>
839
- <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">e</span>)
840
- <span class="ruby-identifier">e</span>.<span class="ruby-identifier">elements</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-identifier">name</span>] = <span class="ruby-identifier">p</span>.<span class="ruby-identifier">text</span>} <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">nil?</span>
841
- <span class="ruby-keyword kw">end</span></pre>
842
- </div>
843
-
844
- </div>
845
-
846
-
847
- </div>
848
-
849
-
850
- <div id="decode-pre-config-method" class="method-detail ">
851
- <a name="M000021"></a>
852
-
853
- <div class="method-heading">
854
-
855
- <span class="method-name">decode_pre_config</span><span
856
- class="method-args">(e)</span>
857
- <span class="method-click-advice">click to toggle source</span>
858
-
859
- </div>
860
-
861
- <div class="method-description">
862
-
863
- <p class="missing-docs">(Not documented)</p>
864
-
865
-
866
-
867
- <div class="method-source-code"
868
- id="decode-pre-config-source">
869
- <pre>
870
- <span class="ruby-comment cmt"># File log4r/configurator.rb, line 92</span>
871
- <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">e</span>)
872
- <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">e</span>.<span class="ruby-identifier">nil?</span>
873
- <span class="ruby-identifier">decode_custom_levels</span>(<span class="ruby-identifier">e</span>.<span class="ruby-identifier">elements</span>[<span class="ruby-value str">'custom_levels'</span>])
874
- <span class="ruby-identifier">global_config</span>(<span class="ruby-identifier">e</span>.<span class="ruby-identifier">elements</span>[<span class="ruby-value str">'global'</span>])
875
- <span class="ruby-identifier">global_config</span>(<span class="ruby-identifier">e</span>.<span class="ruby-identifier">elements</span>[<span class="ruby-value str">'root'</span>])
876
- <span class="ruby-identifier">decode_parameters</span>(<span class="ruby-identifier">e</span>.<span class="ruby-identifier">elements</span>[<span class="ruby-value str">'parameters'</span>])
877
- <span class="ruby-identifier">e</span>.<span class="ruby-identifier">elements</span>.<span class="ruby-identifier">each</span>(<span class="ruby-value str">'parameter'</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">p</span><span class="ruby-operator">|</span> <span class="ruby-identifier">decode_parameter</span>(<span class="ruby-identifier">p</span>)}
878
- <span class="ruby-keyword kw">end</span></pre>
879
- </div>
880
-
881
- </div>
882
-
883
-
884
- </div>
885
-
886
-
887
- <div id="decode-xml-method" class="method-detail ">
888
- <a name="M000020"></a>
889
-
890
- <div class="method-heading">
891
-
892
- <span class="method-name">decode_xml</span><span
893
- class="method-args">(doc)</span>
894
- <span class="method-click-advice">click to toggle source</span>
895
-
896
- </div>
897
-
898
- <div class="method-description">
899
-
900
- <p class="missing-docs">(Not documented)</p>
901
-
902
-
903
-
904
- <div class="method-source-code"
905
- id="decode-xml-source">
906
- <pre>
907
- <span class="ruby-comment cmt"># File log4r/configurator.rb, line 85</span>
908
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">decode_xml</span>(<span class="ruby-identifier">doc</span>)
909
- <span class="ruby-identifier">decode_pre_config</span>(<span class="ruby-identifier">doc</span>.<span class="ruby-identifier">elements</span>[<span class="ruby-value str">'pre_config'</span>])
910
- <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">elements</span>.<span class="ruby-identifier">each</span>(<span class="ruby-value str">'outputter'</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span> <span class="ruby-identifier">decode_outputter</span>(<span class="ruby-identifier">e</span>)}
911
- <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">elements</span>.<span class="ruby-identifier">each</span>(<span class="ruby-value str">'logger'</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span> <span class="ruby-identifier">decode_logger</span>(<span class="ruby-identifier">e</span>)}
912
- <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">elements</span>.<span class="ruby-identifier">each</span>(<span class="ruby-value str">'logserver'</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span> <span class="ruby-identifier">decode_logserver</span>(<span class="ruby-identifier">e</span>)}
913
- <span class="ruby-keyword kw">end</span></pre>
914
- </div>
915
-
916
- </div>
917
-
918
-
919
- </div>
920
-
921
-
922
- <div id="detect-rexml-method" class="method-detail ">
923
- <a name="M000018"></a>
924
-
925
- <div class="method-heading">
926
-
927
- <span class="method-name">detect_rexml</span><span
928
- class="method-args">()</span>
929
- <span class="method-click-advice">click to toggle source</span>
930
-
931
- </div>
932
-
933
- <div class="method-description">
934
-
935
-
936
-
937
-
938
-
939
- <div class="method-source-code"
940
- id="detect-rexml-source">
941
- <pre>
942
- <span class="ruby-comment cmt"># File log4r/configurator.rb, line 69</span>
943
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">detect_rexml</span>
944
- <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">HAVE_REXML</span>
945
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">LoadError</span>,
946
- <span class="ruby-value str">&quot;Need REXML to load XML configuration&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>]
947
- <span class="ruby-keyword kw">end</span>
948
- <span class="ruby-keyword kw">end</span></pre>
949
- </div>
950
-
951
- </div>
952
-
953
-
954
- </div>
955
-
956
-
957
- <div id="global-config-method" class="method-detail ">
958
- <a name="M000023"></a>
959
-
960
- <div class="method-heading">
961
-
962
- <span class="method-name">global_config</span><span
963
- class="method-args">(e)</span>
964
- <span class="method-click-advice">click to toggle source</span>
965
-
966
- </div>
967
-
968
- <div class="method-description">
969
-
970
- <p class="missing-docs">(Not documented)</p>
971
-
972
-
973
-
974
- <div class="method-source-code"
975
- id="global-config-source">
976
- <pre>
977
- <span class="ruby-comment cmt"># File log4r/configurator.rb, line 109</span>
978
- <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>)
979
- <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>
980
- <span class="ruby-identifier">globlev</span> = <span class="ruby-identifier">e</span>.<span class="ruby-identifier">value_of</span> <span class="ruby-value str">'level'</span>
981
- <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>
982
- <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>
983
- <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>
984
- <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">global</span>.<span class="ruby-identifier">level</span> = <span class="ruby-identifier">lev</span>
985
- <span class="ruby-keyword kw">end</span></pre>
986
- </div>
987
-
988
- </div>
989
-
990
-
991
- </div>
992
-
993
-
994
- <div id="paramsub-method" class="method-detail ">
995
- <a name="M000029"></a>
996
-
997
- <div class="method-heading">
998
-
999
- <span class="method-name">paramsub</span><span
1000
- class="method-args">(str)</span>
1001
- <span class="method-click-advice">click to toggle source</span>
1002
-
1003
- </div>
1004
-
1005
- <div class="method-description">
1006
-
1007
- <p>
1008
- Substitues any #{foo} in the XML with Parameter[&#8216;foo&#8217;]
1009
- </p>
1010
-
1011
-
1012
-
1013
- <div class="method-source-code"
1014
- id="paramsub-source">
1015
- <pre>
1016
- <span class="ruby-comment cmt"># File log4r/configurator.rb, line 189</span>
1017
- <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>)
1018
- <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>
1019
- <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> <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>}
1020
- <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>
1021
- <span class="ruby-keyword kw">end</span></pre>
1022
- </div>
1023
-
1024
- </div>
1025
-
1026
-
1027
- </div>
1028
-
1029
-
1030
- </div>
1031
-
1032
-
1033
- </div>
1034
-
1035
-
1036
- <div id="rdoc-debugging-section-dump" class="debugging-section">
1037
-
1038
- <p>Disabled; run with --debug to generate this.</p>
1039
-
1040
- </div>
1041
-
1042
- <div id="validator-badges">
1043
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
1044
- <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
1045
- Rdoc Generator</a> 1.1.6</small>.</p>
1046
- </div>
1047
-
1048
- </body>
1049
- </html>
1050
-