log4r 1.1.7 → 1.1.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (404) hide show
  1. data/README +16 -14
  2. data/Rakefile +4 -4
  3. data/doc/content/contact.html +1 -1
  4. data/doc/content/contribute.html +1 -1
  5. data/doc/content/index.html +1 -1
  6. data/doc/content/license.html +1 -1
  7. data/doc/content/manual.html +1 -1
  8. data/doc/dev/README.developers +1 -1
  9. data/doc/dev/checklist +1 -1
  10. data/doc/rdoc-log4r.css +1 -1
  11. data/examples/ancestors.rb +53 -0
  12. data/examples/customlevels.rb +1 -1
  13. data/examples/filelog.rb +1 -1
  14. data/examples/fileroll.rb +2 -2
  15. data/examples/gmail.rb +30 -0
  16. data/examples/gmail.yaml +95 -0
  17. data/examples/logclient.rb +1 -1
  18. data/examples/logs/TestSize000001.log +575 -0
  19. data/examples/logs/TestSize000002.log +567 -0
  20. data/examples/logs/TestSize000003.log +552 -0
  21. data/examples/logs/TestSize000004.log +552 -0
  22. data/examples/logs/TestSize000005.log +552 -0
  23. data/examples/logs/TestSize000006.log +552 -0
  24. data/examples/logs/TestSize000007.log +552 -0
  25. data/examples/logs/TestSize000008.log +552 -0
  26. data/examples/logs/TestSize000009.log +552 -0
  27. data/examples/logs/TestSize000010.log +552 -0
  28. data/examples/logs/TestSize000011.log +552 -0
  29. data/examples/logs/TestSize000012.log +552 -0
  30. data/examples/logs/TestSize000013.log +552 -0
  31. data/examples/logs/TestSize000014.log +552 -0
  32. data/examples/logs/TestSize000015.log +552 -0
  33. data/examples/logs/TestSize000016.log +552 -0
  34. data/examples/logs/TestSize000017.log +552 -0
  35. data/examples/logs/TestSize000018.log +552 -0
  36. data/examples/logs/TestSize000019.log +535 -0
  37. data/examples/logs/TestSize000020.log +534 -0
  38. data/examples/logs/TestSize000021.log +534 -0
  39. data/examples/logs/TestSize000022.log +534 -0
  40. data/examples/logs/TestSize000023.log +534 -0
  41. data/examples/logs/TestSize000024.log +534 -0
  42. data/examples/logs/TestSize000025.log +534 -0
  43. data/examples/logs/TestSize000026.log +534 -0
  44. data/examples/logs/TestSize000027.log +534 -0
  45. data/examples/logs/TestSize000028.log +534 -0
  46. data/examples/logs/TestSize000029.log +534 -0
  47. data/examples/logs/TestSize000030.log +534 -0
  48. data/examples/logs/TestSize000031.log +534 -0
  49. data/examples/logs/TestSize000032.log +534 -0
  50. data/examples/logs/TestSize000033.log +534 -0
  51. data/examples/logs/TestSize000034.log +534 -0
  52. data/examples/logs/TestSize000035.log +534 -0
  53. data/examples/logs/TestSize000036.log +534 -0
  54. data/examples/logs/TestSize000037.log +534 -0
  55. data/examples/logs/TestSize000038.log +534 -0
  56. data/examples/logs/TestSize000039.log +534 -0
  57. data/examples/logs/TestSize000040.log +534 -0
  58. data/examples/logs/TestSize000041.log +534 -0
  59. data/examples/logs/TestSize000042.log +534 -0
  60. data/examples/logs/TestSize000043.log +534 -0
  61. data/examples/logs/TestSize000044.log +534 -0
  62. data/examples/logs/TestSize000045.log +534 -0
  63. data/examples/logs/TestSize000046.log +534 -0
  64. data/examples/logs/TestSize000047.log +534 -0
  65. data/examples/logs/TestSize000048.log +534 -0
  66. data/examples/logs/TestSize000049.log +534 -0
  67. data/examples/logs/TestSize000050.log +534 -0
  68. data/examples/logs/TestSize000051.log +534 -0
  69. data/examples/logs/TestSize000052.log +534 -0
  70. data/examples/logs/TestSize000053.log +534 -0
  71. data/examples/logs/TestSize000054.log +534 -0
  72. data/examples/logs/TestSize000055.log +534 -0
  73. data/examples/logs/TestSize000056.log +534 -0
  74. data/examples/logs/TestSize000057.log +534 -0
  75. data/examples/logs/TestSize000058.log +534 -0
  76. data/examples/logs/TestSize000059.log +534 -0
  77. data/examples/logs/TestSize000060.log +534 -0
  78. data/examples/logs/TestSize000061.log +534 -0
  79. data/examples/logs/TestSize000062.log +534 -0
  80. data/examples/logs/TestSize000063.log +534 -0
  81. data/examples/logs/TestSize000064.log +534 -0
  82. data/examples/logs/TestSize000065.log +534 -0
  83. data/examples/logs/TestSize000066.log +534 -0
  84. data/examples/logs/TestSize000067.log +534 -0
  85. data/examples/logs/TestSize000068.log +534 -0
  86. data/examples/logs/TestSize000069.log +534 -0
  87. data/examples/logs/TestSize000070.log +534 -0
  88. data/examples/logs/TestSize000071.log +534 -0
  89. data/examples/logs/TestSize000072.log +534 -0
  90. data/examples/logs/TestSize000073.log +534 -0
  91. data/examples/logs/TestSize000074.log +534 -0
  92. data/examples/logs/TestSize000075.log +534 -0
  93. data/examples/logs/TestSize000076.log +534 -0
  94. data/examples/logs/TestSize000077.log +534 -0
  95. data/examples/logs/TestSize000078.log +534 -0
  96. data/examples/logs/TestSize000079.log +534 -0
  97. data/examples/logs/TestSize000080.log +534 -0
  98. data/examples/logs/TestSize000081.log +534 -0
  99. data/examples/logs/TestSize000082.log +534 -0
  100. data/examples/logs/TestSize000083.log +534 -0
  101. data/examples/logs/TestSize000084.log +534 -0
  102. data/examples/logs/TestSize000085.log +534 -0
  103. data/examples/logs/TestSize000086.log +534 -0
  104. data/examples/logs/TestSize000087.log +534 -0
  105. data/examples/logs/TestSize000088.log +534 -0
  106. data/examples/logs/TestSize000089.log +534 -0
  107. data/examples/logs/TestSize000090.log +534 -0
  108. data/examples/logs/TestSize000091.log +534 -0
  109. data/examples/logs/TestSize000092.log +534 -0
  110. data/examples/logs/TestSize000093.log +534 -0
  111. data/examples/logs/TestSize000094.log +534 -0
  112. data/examples/logs/TestSize000095.log +534 -0
  113. data/examples/logs/TestSize000096.log +534 -0
  114. data/examples/logs/TestSize000097.log +534 -0
  115. data/examples/logs/TestSize000098.log +534 -0
  116. data/examples/logs/TestSize000099.log +534 -0
  117. data/examples/logs/TestSize000100.log +534 -0
  118. data/examples/logs/TestSize000101.log +534 -0
  119. data/examples/logs/TestSize000102.log +534 -0
  120. data/examples/logs/TestSize000103.log +534 -0
  121. data/examples/logs/TestSize000104.log +534 -0
  122. data/examples/logs/TestSize000105.log +534 -0
  123. data/examples/logs/TestSize000106.log +534 -0
  124. data/examples/logs/TestSize000107.log +534 -0
  125. data/examples/logs/TestSize000108.log +534 -0
  126. data/examples/logs/TestSize000109.log +534 -0
  127. data/examples/logs/TestSize000110.log +534 -0
  128. data/examples/logs/TestSize000111.log +534 -0
  129. data/examples/logs/TestSize000112.log +534 -0
  130. data/examples/logs/TestSize000113.log +534 -0
  131. data/examples/logs/TestSize000114.log +534 -0
  132. data/examples/logs/TestSize000115.log +534 -0
  133. data/examples/logs/TestSize000116.log +534 -0
  134. data/examples/logs/TestSize000117.log +534 -0
  135. data/examples/logs/TestSize000118.log +534 -0
  136. data/examples/logs/TestSize000119.log +534 -0
  137. data/examples/logs/TestSize000120.log +534 -0
  138. data/examples/logs/TestSize000121.log +534 -0
  139. data/examples/logs/TestSize000122.log +534 -0
  140. data/examples/logs/TestSize000123.log +534 -0
  141. data/examples/logs/TestSize000124.log +534 -0
  142. data/examples/logs/TestSize000125.log +534 -0
  143. data/examples/logs/TestSize000126.log +534 -0
  144. data/examples/logs/TestSize000127.log +534 -0
  145. data/examples/logs/TestSize000128.log +534 -0
  146. data/examples/logs/TestSize000129.log +534 -0
  147. data/examples/logs/TestSize000130.log +534 -0
  148. data/examples/logs/TestSize000131.log +534 -0
  149. data/examples/logs/TestSize000132.log +534 -0
  150. data/examples/logs/TestSize000133.log +534 -0
  151. data/examples/logs/TestSize000134.log +534 -0
  152. data/examples/logs/TestSize000135.log +534 -0
  153. data/examples/logs/TestSize000136.log +534 -0
  154. data/examples/logs/TestSize000137.log +534 -0
  155. data/examples/logs/TestSize000138.log +534 -0
  156. data/examples/logs/TestSize000139.log +534 -0
  157. data/examples/logs/TestSize000140.log +534 -0
  158. data/examples/logs/TestSize000141.log +534 -0
  159. data/examples/logs/TestSize000142.log +534 -0
  160. data/examples/logs/TestSize000143.log +534 -0
  161. data/examples/logs/TestSize000144.log +534 -0
  162. data/examples/logs/TestSize000145.log +534 -0
  163. data/examples/logs/TestSize000146.log +534 -0
  164. data/examples/logs/TestSize000147.log +534 -0
  165. data/examples/logs/TestSize000148.log +534 -0
  166. data/examples/logs/TestSize000149.log +534 -0
  167. data/examples/logs/TestSize000150.log +534 -0
  168. data/examples/logs/TestSize000151.log +534 -0
  169. data/examples/logs/TestSize000152.log +534 -0
  170. data/examples/logs/TestSize000153.log +534 -0
  171. data/examples/logs/TestSize000154.log +534 -0
  172. data/examples/logs/TestSize000155.log +534 -0
  173. data/examples/logs/TestSize000156.log +534 -0
  174. data/examples/logs/TestSize000157.log +534 -0
  175. data/examples/logs/TestSize000158.log +534 -0
  176. data/examples/logs/TestSize000159.log +534 -0
  177. data/examples/logs/TestSize000160.log +534 -0
  178. data/examples/logs/TestSize000161.log +534 -0
  179. data/examples/logs/TestSize000162.log +534 -0
  180. data/examples/logs/TestSize000163.log +534 -0
  181. data/examples/logs/TestSize000164.log +534 -0
  182. data/examples/logs/TestSize000165.log +534 -0
  183. data/examples/logs/TestSize000166.log +534 -0
  184. data/examples/logs/TestSize000167.log +534 -0
  185. data/examples/logs/TestSize000168.log +534 -0
  186. data/examples/logs/TestSize000169.log +534 -0
  187. data/examples/logs/TestSize000170.log +534 -0
  188. data/examples/logs/TestSize000171.log +534 -0
  189. data/examples/logs/TestSize000172.log +534 -0
  190. data/examples/logs/TestSize000173.log +534 -0
  191. data/examples/logs/TestSize000174.log +534 -0
  192. data/examples/logs/TestSize000175.log +534 -0
  193. data/examples/logs/TestSize000176.log +534 -0
  194. data/examples/logs/TestSize000177.log +534 -0
  195. data/examples/logs/TestSize000178.log +534 -0
  196. data/examples/logs/TestSize000179.log +534 -0
  197. data/examples/logs/TestSize000180.log +534 -0
  198. data/examples/logs/TestSize000181.log +534 -0
  199. data/examples/logs/TestSize000182.log +534 -0
  200. data/examples/logs/TestSize000183.log +534 -0
  201. data/examples/logs/TestSize000184.log +534 -0
  202. data/examples/logs/TestSize000185.log +534 -0
  203. data/examples/logs/TestSize000186.log +534 -0
  204. data/examples/logs/TestSize000187.log +313 -0
  205. data/examples/logs/TestTime000001.log +10 -0
  206. data/examples/logs/TestTime000002.log +10 -0
  207. data/examples/logs/TestTime000003.log +10 -0
  208. data/examples/logs/TestTime000004.log +10 -0
  209. data/examples/logs/TestTime000005.log +10 -0
  210. data/examples/logs/TestTime000006.log +10 -0
  211. data/examples/logs/TestTime000007.log +10 -0
  212. data/examples/logs/TestTime000008.log +10 -0
  213. data/examples/logs/TestTime000009.log +10 -0
  214. data/examples/logs/TestTime000010.log +10 -0
  215. data/examples/logs/TestTime000011.log +10 -0
  216. data/examples/logs/TestTime000012.log +10 -0
  217. data/examples/logs/TestTime000013.log +10 -0
  218. data/examples/logs/TestTime000014.log +9 -0
  219. data/examples/logs/TestTime000015.log +10 -0
  220. data/examples/logs/TestTime000016.log +10 -0
  221. data/examples/logs/TestTime000017.log +10 -0
  222. data/examples/logs/TestTime000018.log +10 -0
  223. data/examples/logs/TestTime000019.log +10 -0
  224. data/examples/logs/TestTime000020.log +10 -0
  225. data/examples/logs/TestTime000021.log +1 -0
  226. data/examples/logserver.rb +1 -1
  227. data/examples/moderateconfig.rb +1 -1
  228. data/examples/myformatter.rb +1 -1
  229. data/examples/outofthebox.rb +1 -1
  230. data/examples/rrsetup.rb +1 -1
  231. data/examples/simpleconfig.rb +1 -1
  232. data/examples/syslogcustom.rb +1 -1
  233. data/examples/xmlconfig.rb +1 -1
  234. data/examples/yaml.rb +1 -1
  235. data/{src → lib}/log4r.rb +2 -2
  236. data/{src → lib}/log4r/GDC.rb +1 -1
  237. data/{src → lib}/log4r/MDC.rb +1 -1
  238. data/{src → lib}/log4r/NDC.rb +1 -1
  239. data/{src → lib}/log4r/base.rb +0 -0
  240. data/{src → lib}/log4r/config.rb +1 -1
  241. data/{src → lib}/log4r/configurator.rb +1 -1
  242. data/{src → lib}/log4r/formatter/formatter.rb +1 -1
  243. data/{src → lib}/log4r/formatter/log4jxmlformatter.rb +61 -61
  244. data/{src → lib}/log4r/formatter/patternformatter.rb +3 -2
  245. data/{src → lib}/log4r/lib/drbloader.rb +0 -0
  246. data/{src → lib}/log4r/lib/xmlloader.rb +0 -0
  247. data/{src → lib}/log4r/logevent.rb +0 -0
  248. data/{src → lib}/log4r/logger.rb +6 -1
  249. data/{src → lib}/log4r/loggerfactory.rb +1 -1
  250. data/{src → lib}/log4r/logserver.rb +0 -0
  251. data/{src → lib}/log4r/outputter/consoleoutputters.rb +0 -0
  252. data/{src → lib}/log4r/outputter/datefileoutputter.rb +0 -0
  253. data/{src → lib}/log4r/outputter/emailoutputter.rb +54 -29
  254. data/{src → lib}/log4r/outputter/fileoutputter.rb +1 -1
  255. data/{src → lib}/log4r/outputter/iooutputter.rb +0 -0
  256. data/{src → lib}/log4r/outputter/outputter.rb +6 -4
  257. data/{src → lib}/log4r/outputter/outputterfactory.rb +4 -2
  258. data/{src → lib}/log4r/outputter/remoteoutputter.rb +0 -0
  259. data/lib/log4r/outputter/rollingfileoutputter.rb +234 -0
  260. data/{src → lib}/log4r/outputter/staticoutputter.rb +1 -1
  261. data/{src → lib}/log4r/outputter/syslogoutputter.rb +1 -1
  262. data/{src → lib}/log4r/outputter/udpoutputter.rb +1 -1
  263. data/{src → lib}/log4r/rdoc/GDC +0 -0
  264. data/{src → lib}/log4r/rdoc/MDC +0 -0
  265. data/{src → lib}/log4r/rdoc/NDC +0 -0
  266. data/{src → lib}/log4r/rdoc/configurator +0 -0
  267. data/{src → lib}/log4r/rdoc/emailoutputter +0 -0
  268. data/{src → lib}/log4r/rdoc/formatter +0 -0
  269. data/{src → lib}/log4r/rdoc/log4r +0 -0
  270. data/{src → lib}/log4r/rdoc/logger +0 -0
  271. data/{src → lib}/log4r/rdoc/logserver +0 -0
  272. data/{src → lib}/log4r/rdoc/outputter +0 -0
  273. data/{src → lib}/log4r/rdoc/patternformatter +0 -0
  274. data/{src → lib}/log4r/rdoc/syslogoutputter +0 -0
  275. data/{src → lib}/log4r/rdoc/win32eventoutputter +0 -0
  276. data/{src → lib}/log4r/rdoc/yamlconfigurator +0 -0
  277. data/{src → lib}/log4r/repository.rb +1 -1
  278. data/{src → lib}/log4r/staticlogger.rb +0 -0
  279. data/{src → lib}/log4r/yamlconfigurator.rb +1 -1
  280. data/tests/junk/test +0 -0
  281. data/tests/junk/tmp +0 -0
  282. data/tests/junk/tmpx.log +0 -0
  283. data/tests/testGDC.rb +1 -1
  284. data/tests/testMDC.rb +1 -1
  285. data/tests/testNDC.rb +1 -1
  286. data/tests/testall.rb +1 -1
  287. data/tests/testbase.rb +1 -1
  288. data/tests/testchainsaw.rb +1 -1
  289. data/tests/testlogger.rb +5 -5
  290. data/tests/testoutputter.rb +65 -44
  291. data/tests/testpatternformatter.rb +2 -2
  292. data/tests/testthreads.rb +23 -11
  293. metadata +263 -159
  294. data/doc/rdoc/Log4r.html +0 -519
  295. data/doc/rdoc/Log4r/BasicFormatter.html +0 -388
  296. data/doc/rdoc/Log4r/ConfigError.html +0 -225
  297. data/doc/rdoc/Log4r/Configurator.html +0 -1068
  298. data/doc/rdoc/Log4r/DateFileOutputter.html +0 -479
  299. data/doc/rdoc/Log4r/DefaultFormatter.html +0 -223
  300. data/doc/rdoc/Log4r/EmailOutputter.html +0 -654
  301. data/doc/rdoc/Log4r/FileOutputter.html +0 -346
  302. data/doc/rdoc/Log4r/Formatter.html +0 -309
  303. data/doc/rdoc/Log4r/GDC.html +0 -346
  304. data/doc/rdoc/Log4r/GDC_rb.html +0 -80
  305. data/doc/rdoc/Log4r/IOOutputter.html +0 -410
  306. data/doc/rdoc/Log4r/Log4jXmlFormatter.html +0 -337
  307. data/doc/rdoc/Log4r/Log4rConfig.html +0 -211
  308. data/doc/rdoc/Log4r/Log4rTools.html +0 -388
  309. data/doc/rdoc/Log4r/LogEvent.html +0 -378
  310. data/doc/rdoc/Log4r/LogServer.html +0 -340
  311. data/doc/rdoc/Log4r/Logger.html +0 -1150
  312. data/doc/rdoc/Log4r/Logger/LoggerFactory.html +0 -218
  313. data/doc/rdoc/Log4r/Logger/Repository.html +0 -225
  314. data/doc/rdoc/Log4r/MDC.html +0 -424
  315. data/doc/rdoc/Log4r/MDC_rb.html +0 -83
  316. data/doc/rdoc/Log4r/NDC.html +0 -632
  317. data/doc/rdoc/Log4r/NDC_rb.html +0 -110
  318. data/doc/rdoc/Log4r/ObjectFormatter.html +0 -280
  319. data/doc/rdoc/Log4r/Outputter.html +0 -934
  320. data/doc/rdoc/Log4r/Outputter/OutputterFactory.html +0 -218
  321. data/doc/rdoc/Log4r/Outputter/consoleoutputters_rb.html +0 -57
  322. data/doc/rdoc/Log4r/Outputter/datefileoutputter_rb.html +0 -93
  323. data/doc/rdoc/Log4r/Outputter/emailoutputter_rb.html +0 -179
  324. data/doc/rdoc/Log4r/Outputter/fileoutputter_rb.html +0 -64
  325. data/doc/rdoc/Log4r/Outputter/iooutputter_rb.html +0 -59
  326. data/doc/rdoc/Log4r/Outputter/outputter_rb.html +0 -222
  327. data/doc/rdoc/Log4r/Outputter/outputterfactory_rb.html +0 -62
  328. data/doc/rdoc/Log4r/Outputter/remoteoutputter_rb.html +0 -59
  329. data/doc/rdoc/Log4r/Outputter/rollingfileoutputter_rb.html +0 -66
  330. data/doc/rdoc/Log4r/Outputter/staticoutputter_rb.html +0 -55
  331. data/doc/rdoc/Log4r/Outputter/syslogoutputter_rb.html +0 -110
  332. data/doc/rdoc/Log4r/Outputter/udpoutputter_rb.html +0 -220
  333. data/doc/rdoc/Log4r/PatternFormatter.html +0 -404
  334. data/doc/rdoc/Log4r/ROMPClient.html +0 -211
  335. data/doc/rdoc/Log4r/ROMPServer.html +0 -211
  336. data/doc/rdoc/Log4r/RemoteOutputter.html +0 -402
  337. data/doc/rdoc/Log4r/RollingFileOutputter.html +0 -551
  338. data/doc/rdoc/Log4r/RootLogger.html +0 -530
  339. data/doc/rdoc/Log4r/SimpleFormatter.html +0 -276
  340. data/doc/rdoc/Log4r/StderrOutputter.html +0 -268
  341. data/doc/rdoc/Log4r/StdoutOutputter.html +0 -268
  342. data/doc/rdoc/Log4r/SyslogOutputter.html +0 -551
  343. data/doc/rdoc/Log4r/UDPOutputter.html +0 -379
  344. data/doc/rdoc/Log4r/YamlConfigurator.html +0 -966
  345. data/doc/rdoc/Log4r/base_rb.html +0 -57
  346. data/doc/rdoc/Log4r/config_rb.html +0 -122
  347. data/doc/rdoc/Log4r/configurator_rb.html +0 -370
  348. data/doc/rdoc/Log4r/formatter/formatter_rb.html +0 -121
  349. data/doc/rdoc/Log4r/formatter/log4jxmlformatter_rb.html +0 -64
  350. data/doc/rdoc/Log4r/formatter/patternformatter_rb.html +0 -239
  351. data/doc/rdoc/Log4r/lib/drbloader_rb.html +0 -57
  352. data/doc/rdoc/Log4r/lib/xmlloader_rb.html +0 -57
  353. data/doc/rdoc/Log4r/logevent_rb.html +0 -55
  354. data/doc/rdoc/Log4r/logger_rb.html +0 -293
  355. data/doc/rdoc/Log4r/loggerfactory_rb.html +0 -66
  356. data/doc/rdoc/Log4r/logserver_rb.html +0 -161
  357. data/doc/rdoc/Log4r/rdoc/GDC.html +0 -175
  358. data/doc/rdoc/Log4r/rdoc/MDC.html +0 -178
  359. data/doc/rdoc/Log4r/rdoc/NDC.html +0 -207
  360. data/doc/rdoc/Log4r/rdoc/configurator.html +0 -462
  361. data/doc/rdoc/Log4r/rdoc/emailoutputter.html +0 -279
  362. data/doc/rdoc/Log4r/rdoc/formatter.html +0 -218
  363. data/doc/rdoc/Log4r/rdoc/log4r.html +0 -286
  364. data/doc/rdoc/Log4r/rdoc/logger.html +0 -382
  365. data/doc/rdoc/Log4r/rdoc/logserver.html +0 -265
  366. data/doc/rdoc/Log4r/rdoc/outputter.html +0 -313
  367. data/doc/rdoc/Log4r/rdoc/patternformatter.html +0 -331
  368. data/doc/rdoc/Log4r/rdoc/syslogoutputter.html +0 -197
  369. data/doc/rdoc/Log4r/rdoc/win32eventoutputter.html +0 -165
  370. data/doc/rdoc/Log4r/rdoc/yamlconfigurator.html +0 -187
  371. data/doc/rdoc/Log4r/repository_rb.html +0 -74
  372. data/doc/rdoc/Log4r/staticlogger_rb.html +0 -55
  373. data/doc/rdoc/Log4r/yamlconfigurator_rb.html +0 -95
  374. data/doc/rdoc/REXML.html +0 -211
  375. data/doc/rdoc/created.rid +0 -1
  376. data/doc/rdoc/images/brick.png +0 -0
  377. data/doc/rdoc/images/brick_link.png +0 -0
  378. data/doc/rdoc/images/bug.png +0 -0
  379. data/doc/rdoc/images/bullet_black.png +0 -0
  380. data/doc/rdoc/images/bullet_toggle_minus.png +0 -0
  381. data/doc/rdoc/images/bullet_toggle_plus.png +0 -0
  382. data/doc/rdoc/images/date.png +0 -0
  383. data/doc/rdoc/images/find.png +0 -0
  384. data/doc/rdoc/images/loadingAnimation.gif +0 -0
  385. data/doc/rdoc/images/macFFBgHack.png +0 -0
  386. data/doc/rdoc/images/package.png +0 -0
  387. data/doc/rdoc/images/page_green.png +0 -0
  388. data/doc/rdoc/images/page_white_text.png +0 -0
  389. data/doc/rdoc/images/page_white_width.png +0 -0
  390. data/doc/rdoc/images/plugin.png +0 -0
  391. data/doc/rdoc/images/ruby.png +0 -0
  392. data/doc/rdoc/images/tag_green.png +0 -0
  393. data/doc/rdoc/images/wrench.png +0 -0
  394. data/doc/rdoc/images/wrench_orange.png +0 -0
  395. data/doc/rdoc/images/zoom.png +0 -0
  396. data/doc/rdoc/index.html +0 -585
  397. data/doc/rdoc/js/darkfish.js +0 -116
  398. data/doc/rdoc/js/jquery.js +0 -32
  399. data/doc/rdoc/js/quicksearch.js +0 -114
  400. data/doc/rdoc/js/thickbox-compressed.js +0 -10
  401. data/doc/rdoc/log4r-rdoc.css +0 -696
  402. data/doc/rdoc/log4r_rb.html +0 -207
  403. data/doc/rdoc/rdoc.css +0 -696
  404. data/src/log4r/outputter/rollingfileoutputter.rb +0 -131
@@ -1,110 +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
-
5
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6
- <head>
7
- <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
8
-
9
- <title>File: NDC.rb [1.1.7 Log4r API]</title>
10
-
11
- <link type="text/css" media="screen" href="../rdoc.css" rel="stylesheet" />
12
-
13
- <script src="../js/jquery.js" type="text/javascript"
14
- charset="utf-8"></script>
15
- <script src="../js/thickbox-compressed.js" type="text/javascript"
16
- charset="utf-8"></script>
17
- <script src="../js/quicksearch.js" type="text/javascript"
18
- charset="utf-8"></script>
19
- <script src="../js/darkfish.js" type="text/javascript"
20
- charset="utf-8"></script>
21
- </head>
22
-
23
- <body class="file file-popup">
24
- <div id="metadata">
25
- <dl>
26
- <dt class="modified-date">Last Modified</dt>
27
- <dd class="modified-date">Tue Feb 02 21:20:05 -0800 2010</dd>
28
-
29
-
30
- <dt class="requires">Requires</dt>
31
- <dd class="requires">
32
- <ul>
33
-
34
- </ul>
35
- </dd>
36
-
37
-
38
-
39
- </dl>
40
- </div>
41
-
42
- <div id="documentation">
43
-
44
- <div class="description">
45
- <h2>Description</h2>
46
- <h1>NDC</h1>
47
- <p>
48
- The NDC class implements a copy of the Nested Diagnostic Context, which is
49
- part of the Apache Log4j library. Nested Diagnostic Contexts were derived
50
- from Neil Harrison&#8217;s article on &#8220;Patterns for Logging
51
- Diagnostic Messages&#8221;, part of the book &#8220;Pattern Languages of
52
- Program Design 3&#8221; edited by Martin et al.
53
- </p>
54
- <p>
55
- NDCs in <a href="../Log4r.html">Log4r</a> are thread safe.
56
- </p>
57
- <p>
58
- NDCs in log4r are close enough to NDCs in Log4j that I include its
59
- documentation directly:
60
- </p>
61
- <p>
62
- &#8230; A Nested Diagnostic Context, or NDC in short, is an instrument to
63
- distinguish interleaved log output from different sources. Log output is
64
- typically interleaved when a server handles multiple clients
65
- near-simultaneously.
66
- </p>
67
- <p>
68
- Interleaved log output can still be meaningful if each log entry from
69
- different contexts had a distinctive stamp. This is where NDCs come into
70
- play.
71
- </p>
72
- <p>
73
- Note that NDCs are managed on a per thread basis. NDC operations such as
74
- push, pop(), clear(), getDepth() and setMaxDepth(int) affect the NDC of the
75
- current thread only. NDCs of other threads remain unaffected. &#8230;
76
- </p>
77
- <p>
78
- An important difference between NDCs in <a href="../Log4r.html">Log4r</a>
79
- vs Log4j is that you do not have to called NDC.remove() when exiting a
80
- thread.
81
- </p>
82
- <p>
83
- This class will automatically create Thread specific storage for the
84
- current thread on the first call to any of its methods, i.e.
85
- </p>
86
- <pre>
87
- NDC.push( &quot;client accept&quot; );
88
- </pre>
89
- <p>
90
- New threads may inherit the NDC of the parent thread by making use of the
91
- clone_stack() and inherit() methods. By default, the NDC is not inherited
92
- automatically. This is unlike MDCs, which will inherit from the main
93
- thread.
94
- </p>
95
- <h2>Other Info</h2>
96
- <table>
97
- <tr><td valign="top">Version:</td><td>$Id: NDC.rb,v 1.5 2010/02/03 05:20:05 colbygk Exp $
98
-
99
- </td></tr>
100
- <tr><td valign="top">Author:</td><td>Colby Gutierrez-Kraybill <colby(at)astro.berkeley.edu>
101
-
102
- </td></tr>
103
- </table>
104
-
105
- </div>
106
-
107
- </div>
108
- </body>
109
- </html>
110
-
@@ -1,280 +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::ObjectFormatter</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/formatter/formatter_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
32
- class="thickbox" title="log4r/formatter/formatter.rb">log4r/formatter/formatter.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">Formatter</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="#M000019">#format</a></li>
63
-
64
- </ul>
65
- </div>
66
-
67
-
68
- <!-- Included Modules -->
69
-
70
- </div>
71
-
72
- <div id="project-metadata">
73
-
74
-
75
- <div id="fileindex-section" class="section project-section">
76
- <h3 class="section-header">Files</h3>
77
- <ul>
78
-
79
- <li class="file"><a href="../log4r/rdoc/GDC.html">GDC</a></li>
80
-
81
- <li class="file"><a href="../log4r/rdoc/MDC.html">MDC</a></li>
82
-
83
- <li class="file"><a href="../log4r/rdoc/NDC.html">NDC</a></li>
84
-
85
- <li class="file"><a href="../log4r/rdoc/configurator.html">configurator</a></li>
86
-
87
- <li class="file"><a href="../log4r/rdoc/emailoutputter.html">emailoutputter</a></li>
88
-
89
- <li class="file"><a href="../log4r/rdoc/formatter.html">formatter</a></li>
90
-
91
- <li class="file"><a href="../log4r/rdoc/log4r.html">log4r</a></li>
92
-
93
- <li class="file"><a href="../log4r/rdoc/logger.html">logger</a></li>
94
-
95
- <li class="file"><a href="../log4r/rdoc/logserver.html">logserver</a></li>
96
-
97
- <li class="file"><a href="../log4r/rdoc/outputter.html">outputter</a></li>
98
-
99
- <li class="file"><a href="../log4r/rdoc/patternformatter.html">patternformatter</a></li>
100
-
101
- <li class="file"><a href="../log4r/rdoc/syslogoutputter.html">syslogoutputter</a></li>
102
-
103
- <li class="file"><a href="../log4r/rdoc/win32eventoutputter.html">win32eventoutputter</a></li>
104
-
105
- <li class="file"><a href="../log4r/rdoc/yamlconfigurator.html">yamlconfigurator</a></li>
106
-
107
- </ul>
108
- </div>
109
-
110
-
111
- <div id="classindex-section" class="section project-section">
112
- <h3 class="section-header">Class Index
113
- <span class="search-toggle"><img src="../images/find.png"
114
- height="16" width="16" alt="[+]"
115
- title="show/hide quicksearch" /></span></h3>
116
- <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
117
- <fieldset>
118
- <legend>Quicksearch</legend>
119
- <input type="text" name="quicksearch" value=""
120
- class="quicksearch-field" />
121
- </fieldset>
122
- </form>
123
-
124
- <ul class="link-list">
125
-
126
- <li><a href="../Log4r.html">Log4r</a></li>
127
-
128
- <li><a href="../Log4r/BasicFormatter.html">Log4r::BasicFormatter</a></li>
129
-
130
- <li><a href="../Log4r/ConfigError.html">Log4r::ConfigError</a></li>
131
-
132
- <li><a href="../Log4r/Configurator.html">Log4r::Configurator</a></li>
133
-
134
- <li><a href="../Log4r/DateFileOutputter.html">Log4r::DateFileOutputter</a></li>
135
-
136
- <li><a href="../Log4r/DefaultFormatter.html">Log4r::DefaultFormatter</a></li>
137
-
138
- <li><a href="../Log4r/EmailOutputter.html">Log4r::EmailOutputter</a></li>
139
-
140
- <li><a href="../Log4r/FileOutputter.html">Log4r::FileOutputter</a></li>
141
-
142
- <li><a href="../Log4r/Formatter.html">Log4r::Formatter</a></li>
143
-
144
- <li><a href="../Log4r/GDC.html">Log4r::GDC</a></li>
145
-
146
- <li><a href="../Log4r/IOOutputter.html">Log4r::IOOutputter</a></li>
147
-
148
- <li><a href="../Log4r/Log4jXmlFormatter.html">Log4r::Log4jXmlFormatter</a></li>
149
-
150
- <li><a href="../Log4r/Log4rTools.html">Log4r::Log4rTools</a></li>
151
-
152
- <li><a href="../Log4r/LogEvent.html">Log4r::LogEvent</a></li>
153
-
154
- <li><a href="../Log4r/LogServer.html">Log4r::LogServer</a></li>
155
-
156
- <li><a href="../Log4r/Logger.html">Log4r::Logger</a></li>
157
-
158
- <li><a href="../Log4r/MDC.html">Log4r::MDC</a></li>
159
-
160
- <li><a href="../Log4r/NDC.html">Log4r::NDC</a></li>
161
-
162
- <li><a href="../Log4r/ObjectFormatter.html">Log4r::ObjectFormatter</a></li>
163
-
164
- <li><a href="../Log4r/Outputter.html">Log4r::Outputter</a></li>
165
-
166
- <li><a href="../Log4r/PatternFormatter.html">Log4r::PatternFormatter</a></li>
167
-
168
- <li><a href="../Log4r/RemoteOutputter.html">Log4r::RemoteOutputter</a></li>
169
-
170
- <li><a href="../Log4r/RollingFileOutputter.html">Log4r::RollingFileOutputter</a></li>
171
-
172
- <li><a href="../Log4r/RootLogger.html">Log4r::RootLogger</a></li>
173
-
174
- <li><a href="../Log4r/SimpleFormatter.html">Log4r::SimpleFormatter</a></li>
175
-
176
- <li><a href="../Log4r/StderrOutputter.html">Log4r::StderrOutputter</a></li>
177
-
178
- <li><a href="../Log4r/StdoutOutputter.html">Log4r::StdoutOutputter</a></li>
179
-
180
- <li><a href="../Log4r/SyslogOutputter.html">Log4r::SyslogOutputter</a></li>
181
-
182
- <li><a href="../Log4r/UDPOutputter.html">Log4r::UDPOutputter</a></li>
183
-
184
- <li><a href="../Log4r/YamlConfigurator.html">Log4r::YamlConfigurator</a></li>
185
-
186
- </ul>
187
- <div id="no-class-search-results" style="display: none;">No matching classes.</div>
188
- </div>
189
-
190
-
191
- </div>
192
- </div>
193
-
194
- <div id="documentation">
195
- <h1 class="class">Log4r::ObjectFormatter</h1>
196
-
197
- <div id="description">
198
- <p>
199
- Formats objects the same way irb does:
200
- </p>
201
- <pre>
202
- loggername:foo.rb in 12&gt;
203
- [1, 3, 4]
204
- loggername:foo.rb in 13&gt;
205
- {1=&gt;&quot;1&quot;}
206
- </pre>
207
- <p>
208
- Strings don&#8217;t get inspected. just printed. The trace is optional.
209
- </p>
210
-
211
- </div>
212
-
213
- <!-- Constants -->
214
-
215
-
216
- <!-- Attributes -->
217
-
218
-
219
- <!-- Methods -->
220
-
221
- <div id="public-instance-method-details" class="method-section section">
222
- <h3 class="section-header">Public Instance Methods</h3>
223
-
224
-
225
- <div id="format-method" class="method-detail ">
226
- <a name="M000019"></a>
227
-
228
- <div class="method-heading">
229
-
230
- <span class="method-name">format</span><span
231
- class="method-args">(event)</span>
232
- <span class="method-click-advice">click to toggle source</span>
233
-
234
- </div>
235
-
236
- <div class="method-description">
237
-
238
- <p class="missing-docs">(Not documented)</p>
239
-
240
-
241
-
242
- <div class="method-source-code"
243
- id="format-source">
244
- <pre>
245
- <span class="ruby-comment cmt"># File log4r/formatter/formatter.rb, line 92</span>
246
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">format</span>(<span class="ruby-identifier">event</span>)
247
- <span class="ruby-identifier">buff</span> = <span class="ruby-identifier">event</span>.<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">name</span>
248
- <span class="ruby-identifier">buff</span> <span class="ruby-operator">&lt;&lt;</span> (<span class="ruby-identifier">event</span>.<span class="ruby-identifier">tracer</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-value">? </span><span class="ruby-value str">&quot;&quot;</span> <span class="ruby-operator">:</span> <span class="ruby-node">&quot;:#{event.tracer[0]}&quot;</span>) <span class="ruby-operator">+</span> <span class="ruby-value str">&quot;&gt;\n&quot;</span>
249
- <span class="ruby-identifier">buff</span> <span class="ruby-operator">&lt;&lt;</span> (<span class="ruby-identifier">event</span>.<span class="ruby-identifier">data</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">String</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">event</span>.<span class="ruby-identifier">data</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">event</span>.<span class="ruby-identifier">data</span>.<span class="ruby-identifier">inspect</span>)
250
- <span class="ruby-identifier">buff</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;\n&quot;</span>
251
- <span class="ruby-keyword kw">end</span></pre>
252
- </div>
253
-
254
- </div>
255
-
256
-
257
- </div>
258
-
259
-
260
- </div>
261
-
262
-
263
- </div>
264
-
265
-
266
- <div id="rdoc-debugging-section-dump" class="debugging-section">
267
-
268
- <p>Disabled; run with --debug to generate this.</p>
269
-
270
- </div>
271
-
272
- <div id="validator-badges">
273
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
274
- <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
275
- Rdoc Generator</a> 1.1.6</small>.</p>
276
- </div>
277
-
278
- </body>
279
- </html>
280
-
@@ -1,934 +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::Outputter</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/outputter_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
32
- class="thickbox" title="log4r/outputter/outputter.rb">log4r/outputter/outputter.rb</a></li>
33
-
34
- <li><a href="../log4r/outputter/outputterfactory_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
35
- class="thickbox" title="log4r/outputter/outputterfactory.rb">log4r/outputter/outputterfactory.rb</a></li>
36
-
37
- <li><a href="../log4r/outputter/staticoutputter_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
38
- class="thickbox" title="log4r/outputter/staticoutputter.rb">log4r/outputter/staticoutputter.rb</a></li>
39
-
40
- </ul>
41
- </div>
42
- </div>
43
-
44
-
45
- </div>
46
-
47
- <div id="class-metadata">
48
-
49
- <!-- Parent Class -->
50
-
51
- <div id="parent-class-section" class="section">
52
- <h3 class="section-header">Parent</h3>
53
-
54
- <p class="link">Object</p>
55
-
56
- </div>
57
-
58
-
59
- <!-- Namespace Contents -->
60
-
61
- <div id="namespace-list-section" class="section">
62
- <h3 class="section-header">Namespace</h3>
63
- <ul class="link-list">
64
-
65
- <li><span class="type">CLASS</span> <a href="Outputter/OutputterFactory.html">Log4r::Outputter::OutputterFactory</a></li>
66
-
67
- </ul>
68
- </div>
69
-
70
-
71
- <!-- Method Quickref -->
72
-
73
- <div id="method-list-section" class="section">
74
- <h3 class="section-header">Methods</h3>
75
- <ul class="link-list">
76
-
77
- <li><a href="#M000115">::[]</a></li>
78
-
79
- <li><a href="#M000118">::[]=</a></li>
80
-
81
- <li><a href="#M000121">::each</a></li>
82
-
83
- <li><a href="#M000122">::each_outputter</a></li>
84
-
85
- <li><a href="#M000098">::new</a></li>
86
-
87
- <li><a href="#M000117">::stderr</a></li>
88
-
89
- <li><a href="#M000116">::stdout</a></li>
90
-
91
- <li><a href="#M000104">#canonical_log</a></li>
92
-
93
- <li><a href="#M000102">#flush</a></li>
94
-
95
- <li><a href="#M000105">#format</a></li>
96
-
97
- <li><a href="#M000101">#formatter=</a></li>
98
-
99
- <li><a href="#M000099">#level=</a></li>
100
-
101
- <li><a href="#M000100">#only_at</a></li>
102
-
103
- <li><a href="#M000107">#synch</a></li>
104
-
105
- <li><a href="#M000103">#validate_hash</a></li>
106
-
107
- <li><a href="#M000106">#write</a></li>
108
-
109
- </ul>
110
- </div>
111
-
112
-
113
- <!-- Included Modules -->
114
-
115
- </div>
116
-
117
- <div id="project-metadata">
118
-
119
-
120
- <div id="fileindex-section" class="section project-section">
121
- <h3 class="section-header">Files</h3>
122
- <ul>
123
-
124
- <li class="file"><a href="../log4r/rdoc/GDC.html">GDC</a></li>
125
-
126
- <li class="file"><a href="../log4r/rdoc/MDC.html">MDC</a></li>
127
-
128
- <li class="file"><a href="../log4r/rdoc/NDC.html">NDC</a></li>
129
-
130
- <li class="file"><a href="../log4r/rdoc/configurator.html">configurator</a></li>
131
-
132
- <li class="file"><a href="../log4r/rdoc/emailoutputter.html">emailoutputter</a></li>
133
-
134
- <li class="file"><a href="../log4r/rdoc/formatter.html">formatter</a></li>
135
-
136
- <li class="file"><a href="../log4r/rdoc/log4r.html">log4r</a></li>
137
-
138
- <li class="file"><a href="../log4r/rdoc/logger.html">logger</a></li>
139
-
140
- <li class="file"><a href="../log4r/rdoc/logserver.html">logserver</a></li>
141
-
142
- <li class="file"><a href="../log4r/rdoc/outputter.html">outputter</a></li>
143
-
144
- <li class="file"><a href="../log4r/rdoc/patternformatter.html">patternformatter</a></li>
145
-
146
- <li class="file"><a href="../log4r/rdoc/syslogoutputter.html">syslogoutputter</a></li>
147
-
148
- <li class="file"><a href="../log4r/rdoc/win32eventoutputter.html">win32eventoutputter</a></li>
149
-
150
- <li class="file"><a href="../log4r/rdoc/yamlconfigurator.html">yamlconfigurator</a></li>
151
-
152
- </ul>
153
- </div>
154
-
155
-
156
- <div id="classindex-section" class="section project-section">
157
- <h3 class="section-header">Class Index
158
- <span class="search-toggle"><img src="../images/find.png"
159
- height="16" width="16" alt="[+]"
160
- title="show/hide quicksearch" /></span></h3>
161
- <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
162
- <fieldset>
163
- <legend>Quicksearch</legend>
164
- <input type="text" name="quicksearch" value=""
165
- class="quicksearch-field" />
166
- </fieldset>
167
- </form>
168
-
169
- <ul class="link-list">
170
-
171
- <li><a href="../Log4r.html">Log4r</a></li>
172
-
173
- <li><a href="../Log4r/BasicFormatter.html">Log4r::BasicFormatter</a></li>
174
-
175
- <li><a href="../Log4r/ConfigError.html">Log4r::ConfigError</a></li>
176
-
177
- <li><a href="../Log4r/Configurator.html">Log4r::Configurator</a></li>
178
-
179
- <li><a href="../Log4r/DateFileOutputter.html">Log4r::DateFileOutputter</a></li>
180
-
181
- <li><a href="../Log4r/DefaultFormatter.html">Log4r::DefaultFormatter</a></li>
182
-
183
- <li><a href="../Log4r/EmailOutputter.html">Log4r::EmailOutputter</a></li>
184
-
185
- <li><a href="../Log4r/FileOutputter.html">Log4r::FileOutputter</a></li>
186
-
187
- <li><a href="../Log4r/Formatter.html">Log4r::Formatter</a></li>
188
-
189
- <li><a href="../Log4r/GDC.html">Log4r::GDC</a></li>
190
-
191
- <li><a href="../Log4r/IOOutputter.html">Log4r::IOOutputter</a></li>
192
-
193
- <li><a href="../Log4r/Log4jXmlFormatter.html">Log4r::Log4jXmlFormatter</a></li>
194
-
195
- <li><a href="../Log4r/Log4rTools.html">Log4r::Log4rTools</a></li>
196
-
197
- <li><a href="../Log4r/LogEvent.html">Log4r::LogEvent</a></li>
198
-
199
- <li><a href="../Log4r/LogServer.html">Log4r::LogServer</a></li>
200
-
201
- <li><a href="../Log4r/Logger.html">Log4r::Logger</a></li>
202
-
203
- <li><a href="../Log4r/MDC.html">Log4r::MDC</a></li>
204
-
205
- <li><a href="../Log4r/NDC.html">Log4r::NDC</a></li>
206
-
207
- <li><a href="../Log4r/ObjectFormatter.html">Log4r::ObjectFormatter</a></li>
208
-
209
- <li><a href="../Log4r/Outputter.html">Log4r::Outputter</a></li>
210
-
211
- <li><a href="../Log4r/PatternFormatter.html">Log4r::PatternFormatter</a></li>
212
-
213
- <li><a href="../Log4r/RemoteOutputter.html">Log4r::RemoteOutputter</a></li>
214
-
215
- <li><a href="../Log4r/RollingFileOutputter.html">Log4r::RollingFileOutputter</a></li>
216
-
217
- <li><a href="../Log4r/RootLogger.html">Log4r::RootLogger</a></li>
218
-
219
- <li><a href="../Log4r/SimpleFormatter.html">Log4r::SimpleFormatter</a></li>
220
-
221
- <li><a href="../Log4r/StderrOutputter.html">Log4r::StderrOutputter</a></li>
222
-
223
- <li><a href="../Log4r/StdoutOutputter.html">Log4r::StdoutOutputter</a></li>
224
-
225
- <li><a href="../Log4r/SyslogOutputter.html">Log4r::SyslogOutputter</a></li>
226
-
227
- <li><a href="../Log4r/UDPOutputter.html">Log4r::UDPOutputter</a></li>
228
-
229
- <li><a href="../Log4r/YamlConfigurator.html">Log4r::YamlConfigurator</a></li>
230
-
231
- </ul>
232
- <div id="no-class-search-results" style="display: none;">No matching classes.</div>
233
- </div>
234
-
235
-
236
- </div>
237
- </div>
238
-
239
- <div id="documentation">
240
- <h1 class="class">Log4r::Outputter</h1>
241
-
242
- <div id="description">
243
-
244
- </div>
245
-
246
- <!-- Constants -->
247
-
248
-
249
- <!-- Attributes -->
250
-
251
- <div id="attribute-method-details" class="method-section section">
252
- <h3 class="section-header">Attributes</h3>
253
-
254
-
255
- <div id="name-attribute-method" class="method-detail">
256
- <a name="name"></a>
257
-
258
- <div class="method-heading attribute-method-heading">
259
- <span class="method-name">name</span><span
260
- class="attribute-access-type">[R]</span>
261
- </div>
262
-
263
- <div class="method-description">
264
-
265
- <p class="missing-docs">(Not documented)</p>
266
-
267
- </div>
268
- </div>
269
-
270
- <div id="level-attribute-method" class="method-detail">
271
- <a name="level"></a>
272
-
273
- <div class="method-heading attribute-method-heading">
274
- <span class="method-name">level</span><span
275
- class="attribute-access-type">[R]</span>
276
- </div>
277
-
278
- <div class="method-description">
279
-
280
- <p class="missing-docs">(Not documented)</p>
281
-
282
- </div>
283
- </div>
284
-
285
- <div id="formatter-attribute-method" class="method-detail">
286
- <a name="formatter"></a>
287
-
288
- <div class="method-heading attribute-method-heading">
289
- <span class="method-name">formatter</span><span
290
- class="attribute-access-type">[R]</span>
291
- </div>
292
-
293
- <div class="method-description">
294
-
295
- <p class="missing-docs">(Not documented)</p>
296
-
297
- </div>
298
- </div>
299
-
300
- </div>
301
-
302
-
303
- <!-- Methods -->
304
-
305
- <div id="public-class-method-details" class="method-section section">
306
- <h3 class="section-header">Public Class Methods</h3>
307
-
308
-
309
- <div id="--method" class="method-detail ">
310
- <a name="M000115"></a>
311
-
312
- <div class="method-heading">
313
-
314
- <span class="method-name">[]</span><span
315
- class="method-args">(name)</span>
316
- <span class="method-click-advice">click to toggle source</span>
317
-
318
- </div>
319
-
320
- <div class="method-description">
321
-
322
- <p>
323
- Retrieve an outputter.
324
- </p>
325
-
326
-
327
-
328
- <div class="method-source-code"
329
- id="--source">
330
- <pre>
331
- <span class="ruby-comment cmt"># File log4r/outputter/staticoutputter.rb, line 6</span>
332
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-operator">[]</span>(<span class="ruby-identifier">name</span>)
333
- <span class="ruby-identifier">out</span> = <span class="ruby-ivar">@@outputters</span>[<span class="ruby-identifier">name</span>]
334
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">out</span>.<span class="ruby-identifier">nil?</span>
335
- <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">name</span>
336
- <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'stdout'</span> <span class="ruby-keyword kw">then</span> <span class="ruby-constant">StdoutOutputter</span>.<span class="ruby-identifier">new</span> <span class="ruby-value str">'stdout'</span>
337
- <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'stderr'</span> <span class="ruby-keyword kw">then</span> <span class="ruby-constant">StderrOutputter</span>.<span class="ruby-identifier">new</span> <span class="ruby-value str">'stderr'</span>
338
- <span class="ruby-keyword kw">else</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">end</span>
339
- <span class="ruby-keyword kw">end</span>
340
- <span class="ruby-identifier">out</span>
341
- <span class="ruby-keyword kw">end</span></pre>
342
- </div>
343
-
344
- </div>
345
-
346
-
347
- </div>
348
-
349
-
350
- <div id="--method" class="method-detail ">
351
- <a name="M000118"></a>
352
-
353
- <div class="method-heading">
354
-
355
- <span class="method-name">[]=</span><span
356
- class="method-args">(name, outputter)</span>
357
- <span class="method-click-advice">click to toggle source</span>
358
-
359
- </div>
360
-
361
- <div class="method-description">
362
-
363
- <p>
364
- Set an outputter.
365
- </p>
366
-
367
-
368
-
369
- <div class="method-source-code"
370
- id="--source">
371
- <pre>
372
- <span class="ruby-comment cmt"># File log4r/outputter/staticoutputter.rb, line 19</span>
373
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-operator">[]=</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">outputter</span>)
374
- <span class="ruby-ivar">@@outputters</span>[<span class="ruby-identifier">name</span>] = <span class="ruby-identifier">outputter</span>
375
- <span class="ruby-keyword kw">end</span></pre>
376
- </div>
377
-
378
- </div>
379
-
380
-
381
- </div>
382
-
383
-
384
- <div id="each-method" class="method-detail ">
385
- <a name="M000121"></a>
386
-
387
- <div class="method-heading">
388
-
389
- <span class="method-name">each</span><span
390
- class="method-args">()</span>
391
- <span class="method-click-advice">click to toggle source</span>
392
-
393
- </div>
394
-
395
- <div class="method-description">
396
-
397
- <p>
398
- Yields each outputter&#8217;s name and reference.
399
- </p>
400
-
401
-
402
-
403
- <div class="method-source-code"
404
- id="each-source">
405
- <pre>
406
- <span class="ruby-comment cmt"># File log4r/outputter/staticoutputter.rb, line 23</span>
407
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">each</span>
408
- <span class="ruby-ivar">@@outputters</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">name</span>, <span class="ruby-identifier">outputter</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">name</span>, <span class="ruby-identifier">outputter</span>}
409
- <span class="ruby-keyword kw">end</span></pre>
410
- </div>
411
-
412
- </div>
413
-
414
-
415
- </div>
416
-
417
-
418
- <div id="each-outputter-method" class="method-detail ">
419
- <a name="M000122"></a>
420
-
421
- <div class="method-heading">
422
-
423
- <span class="method-name">each_outputter</span><span
424
- class="method-args">()</span>
425
- <span class="method-click-advice">click to toggle source</span>
426
-
427
- </div>
428
-
429
- <div class="method-description">
430
-
431
- <p class="missing-docs">(Not documented)</p>
432
-
433
-
434
-
435
- <div class="method-source-code"
436
- id="each-outputter-source">
437
- <pre>
438
- <span class="ruby-comment cmt"># File log4r/outputter/staticoutputter.rb, line 26</span>
439
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">each_outputter</span>
440
- <span class="ruby-ivar">@@outputters</span>.<span class="ruby-identifier">each_value</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">outputter</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">yield</span> <span class="ruby-identifier">outputter</span>}
441
- <span class="ruby-keyword kw">end</span></pre>
442
- </div>
443
-
444
- </div>
445
-
446
-
447
- </div>
448
-
449
-
450
- <div id="new-method" class="method-detail ">
451
- <a name="M000098"></a>
452
-
453
- <div class="method-heading">
454
-
455
- <span class="method-name">new</span><span
456
- class="method-args">(_name, hash={})</span>
457
- <span class="method-click-advice">click to toggle source</span>
458
-
459
- </div>
460
-
461
- <div class="method-description">
462
-
463
- <p>
464
- An <a href="Outputter.html">Outputter</a> needs a name. <a
465
- href="RootLogger.html">RootLogger</a> will be loaded if not already done.
466
- The hash arguments are as follows:
467
- </p>
468
- <dl>
469
- <dt><tt>:level</tt></dt><dd><a href="Logger.html">Logger</a> level. Optional, defaults to root level
470
-
471
- </dd>
472
- <dt><tt>:formatter</tt></dt><dd>A <a href="Formatter.html">Formatter</a>. Defaults to <a
473
- href="DefaultFormatter.html">DefaultFormatter</a>
474
-
475
- </dd>
476
- </dl>
477
-
478
-
479
-
480
- <div class="method-source-code"
481
- id="new-source">
482
- <pre>
483
- <span class="ruby-comment cmt"># File log4r/outputter/outputter.rb, line 26</span>
484
- <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>={})
485
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">_name</span>.<span class="ruby-identifier">nil?</span>
486
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">&quot;Bad arguments. Name and IO expected.&quot;</span>, <span class="ruby-identifier">caller</span>
487
- <span class="ruby-keyword kw">end</span>
488
- <span class="ruby-ivar">@name</span> = <span class="ruby-identifier">_name</span>
489
- <span class="ruby-identifier">validate_hash</span>(<span class="ruby-identifier">hash</span>)
490
- <span class="ruby-ivar">@@outputters</span>[<span class="ruby-ivar">@name</span>] = <span class="ruby-keyword kw">self</span>
491
- <span class="ruby-keyword kw">end</span></pre>
492
- </div>
493
-
494
- </div>
495
-
496
-
497
- </div>
498
-
499
-
500
- <div id="stderr-method" class="method-detail ">
501
- <a name="M000117"></a>
502
-
503
- <div class="method-heading">
504
-
505
- <span class="method-name">stderr</span><span
506
- class="method-args">()</span>
507
- <span class="method-click-advice">click to toggle source</span>
508
-
509
- </div>
510
-
511
- <div class="method-description">
512
-
513
- <p class="missing-docs">(Not documented)</p>
514
-
515
-
516
-
517
- <div class="method-source-code"
518
- id="stderr-source">
519
- <pre>
520
- <span class="ruby-comment cmt"># File log4r/outputter/staticoutputter.rb, line 17</span>
521
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">stderr</span>; <span class="ruby-constant">Outputter</span>[<span class="ruby-value str">'stderr'</span>] <span class="ruby-keyword kw">end</span></pre>
522
- </div>
523
-
524
- </div>
525
-
526
-
527
- </div>
528
-
529
-
530
- <div id="stdout-method" class="method-detail ">
531
- <a name="M000116"></a>
532
-
533
- <div class="method-heading">
534
-
535
- <span class="method-name">stdout</span><span
536
- class="method-args">()</span>
537
- <span class="method-click-advice">click to toggle source</span>
538
-
539
- </div>
540
-
541
- <div class="method-description">
542
-
543
- <p class="missing-docs">(Not documented)</p>
544
-
545
-
546
-
547
- <div class="method-source-code"
548
- id="stdout-source">
549
- <pre>
550
- <span class="ruby-comment cmt"># File log4r/outputter/staticoutputter.rb, line 16</span>
551
- <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">stdout</span>; <span class="ruby-constant">Outputter</span>[<span class="ruby-value str">'stdout'</span>] <span class="ruby-keyword kw">end</span></pre>
552
- </div>
553
-
554
- </div>
555
-
556
-
557
- </div>
558
-
559
-
560
- </div>
561
-
562
- <div id="public-instance-method-details" class="method-section section">
563
- <h3 class="section-header">Public Instance Methods</h3>
564
-
565
-
566
- <div id="flush-method" class="method-detail ">
567
- <a name="M000102"></a>
568
-
569
- <div class="method-heading">
570
-
571
- <span class="method-name">flush</span><span
572
- class="method-args">()</span>
573
- <span class="method-click-advice">click to toggle source</span>
574
-
575
- </div>
576
-
577
- <div class="method-description">
578
-
579
- <p>
580
- Call flush to force an outputter to write out any buffered log events.
581
- Similar to IO#flush, so use in a similar fashion.
582
- </p>
583
-
584
-
585
-
586
- <div class="method-source-code"
587
- id="flush-source">
588
- <pre>
589
- <span class="ruby-comment cmt"># File log4r/outputter/outputter.rb, line 78</span>
590
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">flush</span>
591
- <span class="ruby-keyword kw">end</span></pre>
592
- </div>
593
-
594
- </div>
595
-
596
-
597
- </div>
598
-
599
-
600
- <div id="formatter--method" class="method-detail ">
601
- <a name="M000101"></a>
602
-
603
- <div class="method-heading">
604
-
605
- <span class="method-name">formatter=</span><span
606
- class="method-args">(_formatter)</span>
607
- <span class="method-click-advice">click to toggle source</span>
608
-
609
- </div>
610
-
611
- <div class="method-description">
612
-
613
- <p>
614
- Dynamically change the formatter. You can just specify a Class object and
615
- the formatter will invoke <tt>new</tt> or <tt>instance</tt> on it as
616
- appropriate.
617
- </p>
618
-
619
-
620
-
621
- <div class="method-source-code"
622
- id="formatter--source">
623
- <pre>
624
- <span class="ruby-comment cmt"># File log4r/outputter/outputter.rb, line 60</span>
625
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">formatter=</span>(<span class="ruby-identifier">_formatter</span>)
626
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">_formatter</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">Formatter</span>)
627
- <span class="ruby-ivar">@formatter</span> = <span class="ruby-identifier">_formatter</span>
628
- <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">_formatter</span>.<span class="ruby-identifier">kind_of?</span>(<span class="ruby-constant">Class</span>) <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">_formatter</span> <span class="ruby-operator">&lt;=</span> <span class="ruby-constant">Formatter</span>
629
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">_formatter</span>.<span class="ruby-identifier">respond_to?</span> <span class="ruby-identifier">:instance</span>
630
- <span class="ruby-ivar">@formatter</span> = <span class="ruby-identifier">_formatter</span>.<span class="ruby-identifier">instance</span>
631
- <span class="ruby-keyword kw">else</span>
632
- <span class="ruby-ivar">@formatter</span> = <span class="ruby-identifier">_formatter</span>.<span class="ruby-identifier">new</span>
633
- <span class="ruby-keyword kw">end</span>
634
- <span class="ruby-keyword kw">else</span>
635
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">TypeError</span>, <span class="ruby-value str">&quot;Argument was not a Formatter!&quot;</span>, <span class="ruby-identifier">caller</span>
636
- <span class="ruby-keyword kw">end</span>
637
- <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">log_internal</span> {<span class="ruby-node">&quot;Outputter '#{@name}' using #{@formatter.class}&quot;</span>}
638
- <span class="ruby-keyword kw">end</span></pre>
639
- </div>
640
-
641
- </div>
642
-
643
-
644
- </div>
645
-
646
-
647
- <div id="level--method" class="method-detail ">
648
- <a name="M000099"></a>
649
-
650
- <div class="method-heading">
651
-
652
- <span class="method-name">level=</span><span
653
- class="method-args">(_level)</span>
654
- <span class="method-click-advice">click to toggle source</span>
655
-
656
- </div>
657
-
658
- <div class="method-description">
659
-
660
- <p>
661
- dynamically change the level
662
- </p>
663
-
664
-
665
-
666
- <div class="method-source-code"
667
- id="level--source">
668
- <pre>
669
- <span class="ruby-comment cmt"># File log4r/outputter/outputter.rb, line 36</span>
670
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">level=</span>(<span class="ruby-identifier">_level</span>)
671
- <span class="ruby-constant">Log4rTools</span>.<span class="ruby-identifier">validate_level</span>(<span class="ruby-identifier">_level</span>)
672
- <span class="ruby-ivar">@level</span> = <span class="ruby-identifier">_level</span>
673
- <span class="ruby-constant">OutputterFactory</span>.<span class="ruby-identifier">create_methods</span>(<span class="ruby-keyword kw">self</span>)
674
- <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">log_internal</span> {<span class="ruby-node">&quot;Outputter '#{@name}' level is #{LNAMES[_level]}&quot;</span>}
675
- <span class="ruby-keyword kw">end</span></pre>
676
- </div>
677
-
678
- </div>
679
-
680
-
681
- </div>
682
-
683
-
684
- <div id="only-at-method" class="method-detail ">
685
- <a name="M000100"></a>
686
-
687
- <div class="method-heading">
688
-
689
- <span class="method-name">only_at</span><span
690
- class="method-args">(*levels)</span>
691
- <span class="method-click-advice">click to toggle source</span>
692
-
693
- </div>
694
-
695
- <div class="method-description">
696
-
697
- <p>
698
- Set the levels to log. All others will be ignored
699
- </p>
700
-
701
-
702
-
703
- <div class="method-source-code"
704
- id="only-at-source">
705
- <pre>
706
- <span class="ruby-comment cmt"># File log4r/outputter/outputter.rb, line 44</span>
707
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">only_at</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">levels</span>)
708
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">&quot;Gimme some levels!&quot;</span>, <span class="ruby-identifier">caller</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">levels</span>.<span class="ruby-identifier">empty?</span>
709
- <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">&quot;Can't log only_at ALL&quot;</span>, <span class="ruby-identifier">caller</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">levels</span>.<span class="ruby-identifier">include?</span> <span class="ruby-constant">ALL</span>
710
- <span class="ruby-identifier">levels</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">level</span><span class="ruby-operator">|</span> <span class="ruby-constant">Log4rTools</span>.<span class="ruby-identifier">validate_level</span>(<span class="ruby-identifier">level</span>)}
711
- <span class="ruby-ivar">@level</span> = <span class="ruby-identifier">levels</span>.<span class="ruby-identifier">sort</span>.<span class="ruby-identifier">first</span>
712
- <span class="ruby-constant">OutputterFactory</span>.<span class="ruby-identifier">create_methods</span> <span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">levels</span>
713
- <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">log_internal</span> {
714
- <span class="ruby-node">&quot;Outputter '#{@name}' writes only on &quot;</span> <span class="ruby-operator">+</span>\
715
- <span class="ruby-identifier">levels</span>.<span class="ruby-identifier">collect</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span> <span class="ruby-constant">LNAMES</span>[<span class="ruby-identifier">l</span>]}.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;, &quot;</span>)
716
- }
717
- <span class="ruby-keyword kw">end</span></pre>
718
- </div>
719
-
720
- </div>
721
-
722
-
723
- </div>
724
-
725
-
726
- <div id="validate-hash-method" class="method-detail ">
727
- <a name="M000103"></a>
728
-
729
- <div class="method-heading">
730
-
731
- <span class="method-name">validate_hash</span><span
732
- class="method-args">(hash)</span>
733
- <span class="method-click-advice">click to toggle source</span>
734
-
735
- </div>
736
-
737
- <div class="method-description">
738
-
739
- <p>
740
- Validates the common hash arguments. For now, that would be
741
- <tt>:level</tt>, <tt>:formatter</tt> and the string equivalents
742
- </p>
743
-
744
-
745
-
746
- <div class="method-source-code"
747
- id="validate-hash-source">
748
- <pre>
749
- <span class="ruby-comment cmt"># File log4r/outputter/outputter.rb, line 87</span>
750
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">validate_hash</span>(<span class="ruby-identifier">hash</span>)
751
- <span class="ruby-ivar">@mutex</span> = <span class="ruby-constant">Mutex</span>.<span class="ruby-identifier">new</span>
752
- <span class="ruby-comment cmt"># default to root level and DefaultFormatter</span>
753
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">hash</span>.<span class="ruby-identifier">empty?</span>
754
- <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">level</span> = <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">root</span>.<span class="ruby-identifier">level</span>
755
- <span class="ruby-ivar">@formatter</span> = <span class="ruby-constant">DefaultFormatter</span>.<span class="ruby-identifier">new</span>
756
- <span class="ruby-keyword kw">return</span>
757
- <span class="ruby-keyword kw">end</span>
758
- <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">level</span> = (<span class="ruby-identifier">hash</span>[<span class="ruby-identifier">:level</span>] <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">hash</span>[<span class="ruby-value str">'level'</span>] <span class="ruby-keyword kw">or</span> <span class="ruby-constant">Logger</span>.<span class="ruby-identifier">root</span>.<span class="ruby-identifier">level</span>)
759
- <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">formatter</span> = (<span class="ruby-identifier">hash</span>[<span class="ruby-identifier">:formatter</span>] <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">hash</span>[<span class="ruby-value str">'formatter'</span>] <span class="ruby-keyword kw">or</span> <span class="ruby-constant">DefaultFormatter</span>.<span class="ruby-identifier">new</span>)
760
- <span class="ruby-keyword kw">end</span></pre>
761
- </div>
762
-
763
- </div>
764
-
765
-
766
- </div>
767
-
768
-
769
- </div>
770
-
771
- <div id="private-instance-method-details" class="method-section section">
772
- <h3 class="section-header">Private Instance Methods</h3>
773
-
774
-
775
- <div id="canonical-log-method" class="method-detail ">
776
- <a name="M000104"></a>
777
-
778
- <div class="method-heading">
779
-
780
- <span class="method-name">canonical_log</span><span
781
- class="method-args">(logevent)</span>
782
- <span class="method-click-advice">click to toggle source</span>
783
-
784
- </div>
785
-
786
- <div class="method-description">
787
-
788
- <p>
789
- This method handles all log events passed to a typical <a
790
- href="Outputter.html">Outputter</a>. Overload this to change the overall
791
- behavior of an outputter. Make sure that the new behavior is thread safe.
792
- </p>
793
-
794
-
795
-
796
- <div class="method-source-code"
797
- id="canonical-log-source">
798
- <pre>
799
- <span class="ruby-comment cmt"># File log4r/outputter/outputter.rb, line 107</span>
800
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">canonical_log</span>(<span class="ruby-identifier">logevent</span>)
801
- <span class="ruby-identifier">synch</span> { <span class="ruby-identifier">write</span>(<span class="ruby-identifier">format</span>(<span class="ruby-identifier">logevent</span>)) }
802
- <span class="ruby-keyword kw">end</span></pre>
803
- </div>
804
-
805
- </div>
806
-
807
-
808
- </div>
809
-
810
-
811
- <div id="format-method" class="method-detail ">
812
- <a name="M000105"></a>
813
-
814
- <div class="method-heading">
815
-
816
- <span class="method-name">format</span><span
817
- class="method-args">(logevent)</span>
818
- <span class="method-click-advice">click to toggle source</span>
819
-
820
- </div>
821
-
822
- <div class="method-description">
823
-
824
- <p>
825
- Common method to format data. All it does is call the resident
826
- formatter&#8217;s format method. If a different formatting behavior is
827
- needed, then overload this method.
828
- </p>
829
-
830
-
831
-
832
- <div class="method-source-code"
833
- id="format-source">
834
- <pre>
835
- <span class="ruby-comment cmt"># File log4r/outputter/outputter.rb, line 115</span>
836
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">format</span>(<span class="ruby-identifier">logevent</span>)
837
- <span class="ruby-comment cmt"># @formatter is guaranteed to be DefaultFormatter if no Formatter</span>
838
- <span class="ruby-comment cmt"># was specified</span>
839
- <span class="ruby-ivar">@formatter</span>.<span class="ruby-identifier">format</span>(<span class="ruby-identifier">logevent</span>)
840
- <span class="ruby-keyword kw">end</span></pre>
841
- </div>
842
-
843
- </div>
844
-
845
-
846
- </div>
847
-
848
-
849
- <div id="synch-method" class="method-detail ">
850
- <a name="M000107"></a>
851
-
852
- <div class="method-heading">
853
-
854
- <span class="method-name">synch</span><span
855
- class="method-args">()</span>
856
- <span class="method-click-advice">click to toggle source</span>
857
-
858
- </div>
859
-
860
- <div class="method-description">
861
-
862
- <p class="missing-docs">(Not documented)</p>
863
-
864
-
865
-
866
- <div class="method-source-code"
867
- id="synch-source">
868
- <pre>
869
- <span class="ruby-comment cmt"># File log4r/outputter/outputter.rb, line 128</span>
870
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">synch</span>; <span class="ruby-ivar">@mutex</span>.<span class="ruby-identifier">synchronize</span> { <span class="ruby-keyword kw">yield</span> } <span class="ruby-keyword kw">end</span></pre>
871
- </div>
872
-
873
- </div>
874
-
875
-
876
- </div>
877
-
878
-
879
- <div id="write-method" class="method-detail ">
880
- <a name="M000106"></a>
881
-
882
- <div class="method-heading">
883
-
884
- <span class="method-name">write</span><span
885
- class="method-args">(data)</span>
886
- <span class="method-click-advice">click to toggle source</span>
887
-
888
- </div>
889
-
890
- <div class="method-description">
891
-
892
- <p>
893
- Abstract method to actually write the data to a destination. Custom
894
- outputters should overload this to specify how the formatted data should be
895
- written and to where.
896
- </p>
897
-
898
-
899
-
900
- <div class="method-source-code"
901
- id="write-source">
902
- <pre>
903
- <span class="ruby-comment cmt"># File log4r/outputter/outputter.rb, line 125</span>
904
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">write</span>(<span class="ruby-identifier">data</span>)
905
- <span class="ruby-keyword kw">end</span></pre>
906
- </div>
907
-
908
- </div>
909
-
910
-
911
- </div>
912
-
913
-
914
- </div>
915
-
916
-
917
- </div>
918
-
919
-
920
- <div id="rdoc-debugging-section-dump" class="debugging-section">
921
-
922
- <p>Disabled; run with --debug to generate this.</p>
923
-
924
- </div>
925
-
926
- <div id="validator-badges">
927
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
928
- <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
929
- Rdoc Generator</a> 1.1.6</small>.</p>
930
- </div>
931
-
932
- </body>
933
- </html>
934
-