path-log4r 1.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. data/INSTALL +11 -0
  2. data/LICENSE +90 -0
  3. data/LICENSE.LGPLv3 +165 -0
  4. data/README +95 -0
  5. data/Rakefile +74 -0
  6. data/TODO +2 -0
  7. data/doc/content/contact.html +22 -0
  8. data/doc/content/contribute.html +21 -0
  9. data/doc/content/index.html +90 -0
  10. data/doc/content/license.html +56 -0
  11. data/doc/content/manual.html +449 -0
  12. data/doc/dev/README.developers +55 -0
  13. data/doc/dev/checklist +23 -0
  14. data/doc/dev/things-to-do +5 -0
  15. data/doc/images/log4r-logo.png +0 -0
  16. data/doc/images/logo2.png +0 -0
  17. data/doc/log4r.css +111 -0
  18. data/doc/rdoc-log4r.css +696 -0
  19. data/doc/templates/main.html +147 -0
  20. data/examples/README +19 -0
  21. data/examples/ancestors.rb +53 -0
  22. data/examples/chainsaw_settings.xml +7 -0
  23. data/examples/customlevels.rb +34 -0
  24. data/examples/filelog.rb +25 -0
  25. data/examples/fileroll.rb +40 -0
  26. data/examples/gmail.rb +30 -0
  27. data/examples/gmail.yaml +95 -0
  28. data/examples/log4r_yaml.yaml +0 -0
  29. data/examples/logclient.rb +25 -0
  30. data/examples/logserver.rb +18 -0
  31. data/examples/moderate.xml +29 -0
  32. data/examples/moderateconfig.rb +66 -0
  33. data/examples/myformatter.rb +23 -0
  34. data/examples/outofthebox.rb +21 -0
  35. data/examples/rdoc-gen +2 -0
  36. data/examples/rrconfig.xml +63 -0
  37. data/examples/rrsetup.rb +42 -0
  38. data/examples/simpleconfig.rb +39 -0
  39. data/examples/syslogcustom.rb +52 -0
  40. data/examples/xmlconfig.rb +25 -0
  41. data/examples/yaml.rb +30 -0
  42. data/lib/log4r.rb +20 -0
  43. data/lib/log4r/GDC.rb +41 -0
  44. data/lib/log4r/MDC.rb +59 -0
  45. data/lib/log4r/NDC.rb +86 -0
  46. data/lib/log4r/base.rb +74 -0
  47. data/lib/log4r/config.rb +9 -0
  48. data/lib/log4r/configurator.rb +224 -0
  49. data/lib/log4r/formatter/formatter.rb +105 -0
  50. data/lib/log4r/formatter/log4jxmlformatter.rb +61 -0
  51. data/lib/log4r/formatter/patternformatter.rb +145 -0
  52. data/lib/log4r/lib/drbloader.rb +52 -0
  53. data/lib/log4r/lib/xmlloader.rb +24 -0
  54. data/lib/log4r/logevent.rb +28 -0
  55. data/lib/log4r/logger.rb +199 -0
  56. data/lib/log4r/loggerfactory.rb +89 -0
  57. data/lib/log4r/logserver.rb +28 -0
  58. data/lib/log4r/outputter/consoleoutputters.rb +18 -0
  59. data/lib/log4r/outputter/datefileoutputter.rb +117 -0
  60. data/lib/log4r/outputter/emailoutputter.rb +143 -0
  61. data/lib/log4r/outputter/fileoutputter.rb +56 -0
  62. data/lib/log4r/outputter/iooutputter.rb +55 -0
  63. data/lib/log4r/outputter/outputter.rb +134 -0
  64. data/lib/log4r/outputter/outputterfactory.rb +61 -0
  65. data/lib/log4r/outputter/remoteoutputter.rb +40 -0
  66. data/lib/log4r/outputter/rollingfileoutputter.rb +234 -0
  67. data/lib/log4r/outputter/scribeoutputter.rb +37 -0
  68. data/lib/log4r/outputter/staticoutputter.rb +30 -0
  69. data/lib/log4r/outputter/syslogoutputter.rb +130 -0
  70. data/lib/log4r/outputter/udpoutputter.rb +53 -0
  71. data/lib/log4r/rdoc/GDC +14 -0
  72. data/lib/log4r/rdoc/MDC +16 -0
  73. data/lib/log4r/rdoc/NDC +41 -0
  74. data/lib/log4r/rdoc/configurator +243 -0
  75. data/lib/log4r/rdoc/emailoutputter +103 -0
  76. data/lib/log4r/rdoc/formatter +39 -0
  77. data/lib/log4r/rdoc/log4r +89 -0
  78. data/lib/log4r/rdoc/logger +175 -0
  79. data/lib/log4r/rdoc/logserver +85 -0
  80. data/lib/log4r/rdoc/outputter +108 -0
  81. data/lib/log4r/rdoc/patternformatter +128 -0
  82. data/lib/log4r/rdoc/scribeoutputter +16 -0
  83. data/lib/log4r/rdoc/syslogoutputter +29 -0
  84. data/lib/log4r/rdoc/win32eventoutputter +7 -0
  85. data/lib/log4r/rdoc/yamlconfigurator +20 -0
  86. data/lib/log4r/repository.rb +88 -0
  87. data/lib/log4r/staticlogger.rb +49 -0
  88. data/lib/log4r/yamlconfigurator.rb +196 -0
  89. data/tests/README +10 -0
  90. data/tests/testGDC.rb +26 -0
  91. data/tests/testMDC.rb +42 -0
  92. data/tests/testNDC.rb +27 -0
  93. data/tests/testall.rb +6 -0
  94. data/tests/testbase.rb +49 -0
  95. data/tests/testchainsaw.rb +48 -0
  96. data/tests/testconf.xml +37 -0
  97. data/tests/testcustom.rb +27 -0
  98. data/tests/testformatter.rb +27 -0
  99. data/tests/testlogger.rb +196 -0
  100. data/tests/testoutputter.rb +132 -0
  101. data/tests/testpatternformatter.rb +78 -0
  102. data/tests/testthreads.rb +35 -0
  103. data/tests/testxmlconf.rb +45 -0
  104. metadata +184 -0
@@ -0,0 +1,35 @@
1
+ # $Id$
2
+ # Test guts sent in by chetreddy bug #27184
3
+ #
4
+ # Note: this test won't always catch a threading problem, as it
5
+ # relies on a brute force approach. NUM_THREADS can be increased
6
+ # to stress the system longer and therefore increasing the chance
7
+ # of exposing a threading issue, however, it is not a definitive
8
+ # test.
9
+ #
10
+
11
+
12
+ $: << File.join("..","lib")
13
+
14
+ require "test/unit"
15
+ require 'log4r'
16
+ include Log4r
17
+
18
+ class TestThreads < Test::Unit::TestCase
19
+
20
+ NUMTHREADS = 1000
21
+
22
+ def test_threads
23
+
24
+ assert_nothing_raised do
25
+ (0..NUMTHREADS).map do |i|
26
+ Thread.new do
27
+ Thread.current[:logger] = Log4r::Logger.new "Hello #{i}"
28
+ Thread.current[:logger].outputters = [StdoutOutputter.new "log4r#{i}"]
29
+ Thread.current[:logger].outputters.each { |i| i.flush }
30
+ Thread.current.exit()
31
+ end
32
+ end.each do |thr| thr.join end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,45 @@
1
+
2
+ One=<<-EOX
3
+ <log4r_config><pre_config><custom_levels> Foo </custom_levels>
4
+ </pre_config></log4r_config>
5
+ EOX
6
+ Two=<<-EOX
7
+ <log4r_config><pre_config><global level="DEBUG"/></pre_config></log4r_config>
8
+ EOX
9
+ Three=<<-EOX
10
+ <log4r_config><pre_config><custom_levels>Foo</custom_levels>
11
+ <global level="Foo"/></pre_config>
12
+ </log4r_config>
13
+ EOX
14
+
15
+ # must be run independently
16
+ class TestXmlConf < TestCase
17
+ def test_load1
18
+ Configurator.load_xml_string(One)
19
+ assert_no_exception{
20
+ assert(Foo == 1)
21
+ assert(Logger.global.level == ALL)
22
+ }
23
+ end
24
+ def test_load2
25
+ Configurator.load_xml_string(Two)
26
+ assert_no_exception{
27
+ assert(Logger.global.level == DEBUG)
28
+ }
29
+ end
30
+ def test_load3
31
+ Configurator.load_xml_string(Three)
32
+ assert_no_exception{
33
+ assert(Foo == 1)
34
+ assert(Logger.global.level == Foo)
35
+ }
36
+ end
37
+ def test_load4
38
+ assert_no_exception {
39
+ Configurator['logpath'] = '.'
40
+ Configurator.load_xml_file "xml/testconf.xml"
41
+ a = Logger['first::second']
42
+ a.bing "what the heck"
43
+ }
44
+ end
45
+ end
metadata ADDED
@@ -0,0 +1,184 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: path-log4r
3
+ version: !ruby/object:Gem::Version
4
+ hash: 7
5
+ prerelease: false
6
+ segments:
7
+ - 1
8
+ - 1
9
+ - 10
10
+ version: 1.1.10
11
+ platform: ruby
12
+ authors:
13
+ - Colby Gutierrez-Kraybill
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2010-11-02 00:00:00 -07:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: scribe
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 3
30
+ segments:
31
+ - 0
32
+ version: "0"
33
+ type: :runtime
34
+ version_requirements: *id001
35
+ description: "See also: http://logging.apache.org/log4j"
36
+ email: colby@astro.berkeley.edu
37
+ executables: []
38
+
39
+ extensions: []
40
+
41
+ extra_rdoc_files:
42
+ - README
43
+ - LICENSE
44
+ - TODO
45
+ files:
46
+ - LICENSE
47
+ - LICENSE.LGPLv3
48
+ - README
49
+ - INSTALL
50
+ - Rakefile
51
+ - TODO
52
+ - doc/log4r.css
53
+ - doc/templates/main.html
54
+ - doc/dev/README.developers
55
+ - doc/dev/checklist
56
+ - doc/dev/things-to-do
57
+ - doc/rdoc-log4r.css
58
+ - doc/content/contribute.html
59
+ - doc/content/contact.html
60
+ - doc/content/license.html
61
+ - doc/content/index.html
62
+ - doc/content/manual.html
63
+ - doc/images/log4r-logo.png
64
+ - doc/images/logo2.png
65
+ - examples/moderate.xml
66
+ - examples/yaml.rb
67
+ - examples/moderateconfig.rb
68
+ - examples/rrsetup.rb
69
+ - examples/customlevels.rb
70
+ - examples/ancestors.rb
71
+ - examples/rdoc-gen
72
+ - examples/rrconfig.xml
73
+ - examples/filelog.rb
74
+ - examples/myformatter.rb
75
+ - examples/fileroll.rb
76
+ - examples/outofthebox.rb
77
+ - examples/xmlconfig.rb
78
+ - examples/README
79
+ - examples/chainsaw_settings.xml
80
+ - examples/logserver.rb
81
+ - examples/gmail.yaml
82
+ - examples/syslogcustom.rb
83
+ - examples/simpleconfig.rb
84
+ - examples/log4r_yaml.yaml
85
+ - examples/logclient.rb
86
+ - examples/gmail.rb
87
+ - lib/log4r/base.rb
88
+ - lib/log4r/MDC.rb
89
+ - lib/log4r/staticlogger.rb
90
+ - lib/log4r/GDC.rb
91
+ - lib/log4r/rdoc/GDC
92
+ - lib/log4r/rdoc/log4r
93
+ - lib/log4r/rdoc/yamlconfigurator
94
+ - lib/log4r/rdoc/logserver
95
+ - lib/log4r/rdoc/outputter
96
+ - lib/log4r/rdoc/syslogoutputter
97
+ - lib/log4r/rdoc/patternformatter
98
+ - lib/log4r/rdoc/configurator
99
+ - lib/log4r/rdoc/emailoutputter
100
+ - lib/log4r/rdoc/logger
101
+ - lib/log4r/rdoc/MDC
102
+ - lib/log4r/rdoc/NDC
103
+ - lib/log4r/rdoc/win32eventoutputter
104
+ - lib/log4r/rdoc/scribeoutputter
105
+ - lib/log4r/rdoc/formatter
106
+ - lib/log4r/repository.rb
107
+ - lib/log4r/NDC.rb
108
+ - lib/log4r/logger.rb
109
+ - lib/log4r/config.rb
110
+ - lib/log4r/lib/xmlloader.rb
111
+ - lib/log4r/lib/drbloader.rb
112
+ - lib/log4r/logevent.rb
113
+ - lib/log4r/configurator.rb
114
+ - lib/log4r/outputter/rollingfileoutputter.rb
115
+ - lib/log4r/outputter/udpoutputter.rb
116
+ - lib/log4r/outputter/emailoutputter.rb
117
+ - lib/log4r/outputter/syslogoutputter.rb
118
+ - lib/log4r/outputter/staticoutputter.rb
119
+ - lib/log4r/outputter/outputter.rb
120
+ - lib/log4r/outputter/remoteoutputter.rb
121
+ - lib/log4r/outputter/iooutputter.rb
122
+ - lib/log4r/outputter/fileoutputter.rb
123
+ - lib/log4r/outputter/outputterfactory.rb
124
+ - lib/log4r/outputter/datefileoutputter.rb
125
+ - lib/log4r/outputter/consoleoutputters.rb
126
+ - lib/log4r/outputter/scribeoutputter.rb
127
+ - lib/log4r/logserver.rb
128
+ - lib/log4r/yamlconfigurator.rb
129
+ - lib/log4r/loggerfactory.rb
130
+ - lib/log4r/formatter/log4jxmlformatter.rb
131
+ - lib/log4r/formatter/patternformatter.rb
132
+ - lib/log4r/formatter/formatter.rb
133
+ - lib/log4r.rb
134
+ - tests/testall.rb
135
+ - tests/testcustom.rb
136
+ - tests/testGDC.rb
137
+ - tests/testMDC.rb
138
+ - tests/testxmlconf.rb
139
+ - tests/testformatter.rb
140
+ - tests/testoutputter.rb
141
+ - tests/testpatternformatter.rb
142
+ - tests/README
143
+ - tests/testNDC.rb
144
+ - tests/testthreads.rb
145
+ - tests/testconf.xml
146
+ - tests/testchainsaw.rb
147
+ - tests/testbase.rb
148
+ - tests/testlogger.rb
149
+ has_rdoc: true
150
+ homepage: http://log4r.rubyforge.org
151
+ licenses: []
152
+
153
+ post_install_message:
154
+ rdoc_options: []
155
+
156
+ require_paths:
157
+ - lib
158
+ required_ruby_version: !ruby/object:Gem::Requirement
159
+ none: false
160
+ requirements:
161
+ - - ">="
162
+ - !ruby/object:Gem::Version
163
+ hash: 3
164
+ segments:
165
+ - 0
166
+ version: "0"
167
+ required_rubygems_version: !ruby/object:Gem::Requirement
168
+ none: false
169
+ requirements:
170
+ - - ">="
171
+ - !ruby/object:Gem::Version
172
+ hash: 3
173
+ segments:
174
+ - 0
175
+ version: "0"
176
+ requirements: []
177
+
178
+ rubyforge_project: log4r
179
+ rubygems_version: 1.3.7
180
+ signing_key:
181
+ specification_version: 3
182
+ summary: Log4r, logging framework for ruby
183
+ test_files: []
184
+