log4r-color 1.1.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (106) 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 +80 -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/color_output.rb +26 -0
  24. data/examples/customlevels.rb +34 -0
  25. data/examples/filelog.rb +25 -0
  26. data/examples/fileroll.rb +40 -0
  27. data/examples/gmail.rb +30 -0
  28. data/examples/gmail.yaml +95 -0
  29. data/examples/log4r_yaml.yaml +0 -0
  30. data/examples/logclient.rb +25 -0
  31. data/examples/logserver.rb +18 -0
  32. data/examples/moderate.xml +29 -0
  33. data/examples/moderateconfig.rb +66 -0
  34. data/examples/myformatter.rb +23 -0
  35. data/examples/outofthebox.rb +21 -0
  36. data/examples/rdoc-gen +2 -0
  37. data/examples/rrconfig.xml +63 -0
  38. data/examples/rrsetup.rb +42 -0
  39. data/examples/simpleconfig.rb +39 -0
  40. data/examples/syslogcustom.rb +52 -0
  41. data/examples/xmlconfig.rb +25 -0
  42. data/examples/yaml.rb +30 -0
  43. data/lib/log4r.rb +20 -0
  44. data/lib/log4r/GDC.rb +41 -0
  45. data/lib/log4r/MDC.rb +59 -0
  46. data/lib/log4r/NDC.rb +86 -0
  47. data/lib/log4r/base.rb +90 -0
  48. data/lib/log4r/config.rb +9 -0
  49. data/lib/log4r/configurator.rb +224 -0
  50. data/lib/log4r/formatter/formatter.rb +105 -0
  51. data/lib/log4r/formatter/log4jxmlformatter.rb +61 -0
  52. data/lib/log4r/formatter/patternformatter.rb +145 -0
  53. data/lib/log4r/lib/drbloader.rb +52 -0
  54. data/lib/log4r/lib/xmlloader.rb +24 -0
  55. data/lib/log4r/logevent.rb +28 -0
  56. data/lib/log4r/logger.rb +199 -0
  57. data/lib/log4r/loggerfactory.rb +89 -0
  58. data/lib/log4r/logserver.rb +28 -0
  59. data/lib/log4r/outputter/consoleoutputters.rb +49 -0
  60. data/lib/log4r/outputter/datefileoutputter.rb +117 -0
  61. data/lib/log4r/outputter/emailoutputter.rb +143 -0
  62. data/lib/log4r/outputter/fileoutputter.rb +56 -0
  63. data/lib/log4r/outputter/iooutputter.rb +55 -0
  64. data/lib/log4r/outputter/outputter.rb +146 -0
  65. data/lib/log4r/outputter/outputterfactory.rb +61 -0
  66. data/lib/log4r/outputter/remoteoutputter.rb +40 -0
  67. data/lib/log4r/outputter/rollingfileoutputter.rb +234 -0
  68. data/lib/log4r/outputter/scribeoutputter.rb +37 -0
  69. data/lib/log4r/outputter/staticoutputter.rb +32 -0
  70. data/lib/log4r/outputter/syslogoutputter.rb +130 -0
  71. data/lib/log4r/outputter/udpoutputter.rb +53 -0
  72. data/lib/log4r/rdoc/GDC +14 -0
  73. data/lib/log4r/rdoc/MDC +16 -0
  74. data/lib/log4r/rdoc/NDC +41 -0
  75. data/lib/log4r/rdoc/configurator +243 -0
  76. data/lib/log4r/rdoc/emailoutputter +103 -0
  77. data/lib/log4r/rdoc/formatter +39 -0
  78. data/lib/log4r/rdoc/log4r +89 -0
  79. data/lib/log4r/rdoc/logger +175 -0
  80. data/lib/log4r/rdoc/logserver +85 -0
  81. data/lib/log4r/rdoc/outputter +108 -0
  82. data/lib/log4r/rdoc/patternformatter +128 -0
  83. data/lib/log4r/rdoc/scribeoutputter +16 -0
  84. data/lib/log4r/rdoc/syslogoutputter +29 -0
  85. data/lib/log4r/rdoc/win32eventoutputter +7 -0
  86. data/lib/log4r/rdoc/yamlconfigurator +20 -0
  87. data/lib/log4r/repository.rb +88 -0
  88. data/lib/log4r/staticlogger.rb +49 -0
  89. data/lib/log4r/yamlconfigurator.rb +196 -0
  90. data/tests/README +10 -0
  91. data/tests/testGDC.rb +26 -0
  92. data/tests/testMDC.rb +42 -0
  93. data/tests/testNDC.rb +27 -0
  94. data/tests/testall.rb +6 -0
  95. data/tests/testbase.rb +49 -0
  96. data/tests/testchainsaw.rb +48 -0
  97. data/tests/testcoloroutput.rb +14 -0
  98. data/tests/testconf.xml +37 -0
  99. data/tests/testcustom.rb +27 -0
  100. data/tests/testformatter.rb +27 -0
  101. data/tests/testlogger.rb +196 -0
  102. data/tests/testoutputter.rb +132 -0
  103. data/tests/testpatternformatter.rb +78 -0
  104. data/tests/testthreads.rb +35 -0
  105. data/tests/testxmlconf.rb +45 -0
  106. metadata +195 -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,195 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: log4r-color
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 1
7
+ - 1
8
+ - 11
9
+ version: 1.1.11
10
+ platform: ruby
11
+ authors:
12
+ - Colby Gutierrez-Kraybill, Kristian Mandrup (color outputter)
13
+ autorequire:
14
+ bindir: bin
15
+ cert_chain: []
16
+
17
+ date: 2011-01-09 00:00:00 +01:00
18
+ default_executable:
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: scribe
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ segments:
29
+ - 0
30
+ version: "0"
31
+ type: :runtime
32
+ version_requirements: *id001
33
+ - !ruby/object:Gem::Dependency
34
+ name: colorize
35
+ prerelease: false
36
+ requirement: &id002 !ruby/object:Gem::Requirement
37
+ none: false
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ segments:
42
+ - 0
43
+ version: "0"
44
+ type: :runtime
45
+ version_requirements: *id002
46
+ description: "See also: http://logging.apache.org/log4j"
47
+ email: colby@astro.berkeley.edu, kmandrup@gmail.com
48
+ executables: []
49
+
50
+ extensions: []
51
+
52
+ extra_rdoc_files:
53
+ - README
54
+ - LICENSE
55
+ - TODO
56
+ files:
57
+ - LICENSE
58
+ - LICENSE.LGPLv3
59
+ - README
60
+ - INSTALL
61
+ - Rakefile
62
+ - TODO
63
+ - doc/content/contact.html
64
+ - doc/content/contribute.html
65
+ - doc/content/index.html
66
+ - doc/content/license.html
67
+ - doc/content/manual.html
68
+ - doc/dev/checklist
69
+ - doc/dev/README.developers
70
+ - doc/dev/things-to-do
71
+ - doc/images/log4r-logo.png
72
+ - doc/images/logo2.png
73
+ - doc/log4r.css
74
+ - doc/rdoc-log4r.css
75
+ - doc/templates/main.html
76
+ - examples/ancestors.rb
77
+ - examples/chainsaw_settings.xml
78
+ - examples/color_output.rb
79
+ - examples/customlevels.rb
80
+ - examples/filelog.rb
81
+ - examples/fileroll.rb
82
+ - examples/gmail.rb
83
+ - examples/gmail.yaml
84
+ - examples/log4r_yaml.yaml
85
+ - examples/logclient.rb
86
+ - examples/logserver.rb
87
+ - examples/moderate.xml
88
+ - examples/moderateconfig.rb
89
+ - examples/myformatter.rb
90
+ - examples/outofthebox.rb
91
+ - examples/rdoc-gen
92
+ - examples/README
93
+ - examples/rrconfig.xml
94
+ - examples/rrsetup.rb
95
+ - examples/simpleconfig.rb
96
+ - examples/syslogcustom.rb
97
+ - examples/xmlconfig.rb
98
+ - examples/yaml.rb
99
+ - lib/log4r/base.rb
100
+ - lib/log4r/config.rb
101
+ - lib/log4r/configurator.rb
102
+ - lib/log4r/formatter/formatter.rb
103
+ - lib/log4r/formatter/log4jxmlformatter.rb
104
+ - lib/log4r/formatter/patternformatter.rb
105
+ - lib/log4r/GDC.rb
106
+ - lib/log4r/lib/drbloader.rb
107
+ - lib/log4r/lib/xmlloader.rb
108
+ - lib/log4r/logevent.rb
109
+ - lib/log4r/logger.rb
110
+ - lib/log4r/loggerfactory.rb
111
+ - lib/log4r/logserver.rb
112
+ - lib/log4r/MDC.rb
113
+ - lib/log4r/NDC.rb
114
+ - lib/log4r/outputter/consoleoutputters.rb
115
+ - lib/log4r/outputter/datefileoutputter.rb
116
+ - lib/log4r/outputter/emailoutputter.rb
117
+ - lib/log4r/outputter/fileoutputter.rb
118
+ - lib/log4r/outputter/iooutputter.rb
119
+ - lib/log4r/outputter/outputter.rb
120
+ - lib/log4r/outputter/outputterfactory.rb
121
+ - lib/log4r/outputter/remoteoutputter.rb
122
+ - lib/log4r/outputter/rollingfileoutputter.rb
123
+ - lib/log4r/outputter/scribeoutputter.rb
124
+ - lib/log4r/outputter/staticoutputter.rb
125
+ - lib/log4r/outputter/syslogoutputter.rb
126
+ - lib/log4r/outputter/udpoutputter.rb
127
+ - lib/log4r/rdoc/configurator
128
+ - lib/log4r/rdoc/emailoutputter
129
+ - lib/log4r/rdoc/formatter
130
+ - lib/log4r/rdoc/GDC
131
+ - lib/log4r/rdoc/log4r
132
+ - lib/log4r/rdoc/logger
133
+ - lib/log4r/rdoc/logserver
134
+ - lib/log4r/rdoc/MDC
135
+ - lib/log4r/rdoc/NDC
136
+ - lib/log4r/rdoc/outputter
137
+ - lib/log4r/rdoc/patternformatter
138
+ - lib/log4r/rdoc/scribeoutputter
139
+ - lib/log4r/rdoc/syslogoutputter
140
+ - lib/log4r/rdoc/win32eventoutputter
141
+ - lib/log4r/rdoc/yamlconfigurator
142
+ - lib/log4r/repository.rb
143
+ - lib/log4r/staticlogger.rb
144
+ - lib/log4r/yamlconfigurator.rb
145
+ - lib/log4r.rb
146
+ - tests/README
147
+ - tests/testall.rb
148
+ - tests/testbase.rb
149
+ - tests/testchainsaw.rb
150
+ - tests/testcoloroutput.rb
151
+ - tests/testconf.xml
152
+ - tests/testcustom.rb
153
+ - tests/testformatter.rb
154
+ - tests/testGDC.rb
155
+ - tests/testlogger.rb
156
+ - tests/testMDC.rb
157
+ - tests/testNDC.rb
158
+ - tests/testoutputter.rb
159
+ - tests/testpatternformatter.rb
160
+ - tests/testthreads.rb
161
+ - tests/testxmlconf.rb
162
+ has_rdoc: true
163
+ homepage: http://log4r.rubyforge.org
164
+ licenses: []
165
+
166
+ post_install_message:
167
+ rdoc_options: []
168
+
169
+ require_paths:
170
+ - lib
171
+ required_ruby_version: !ruby/object:Gem::Requirement
172
+ none: false
173
+ requirements:
174
+ - - ">="
175
+ - !ruby/object:Gem::Version
176
+ segments:
177
+ - 0
178
+ version: "0"
179
+ required_rubygems_version: !ruby/object:Gem::Requirement
180
+ none: false
181
+ requirements:
182
+ - - ">="
183
+ - !ruby/object:Gem::Version
184
+ segments:
185
+ - 0
186
+ version: "0"
187
+ requirements: []
188
+
189
+ rubyforge_project: log4r-color
190
+ rubygems_version: 1.3.7
191
+ signing_key:
192
+ specification_version: 3
193
+ summary: Log4r, logging framework for ruby
194
+ test_files: []
195
+