rjack-slf4j 1.7.7.0-java → 1.7.7.1-java

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4d986d77dfb54bd6456c56c2a14fa207f95ccd4b
4
- data.tar.gz: f02716edd0b092aee397f3b264c4424ed08a76c8
3
+ metadata.gz: 68f4351d7a6899687bf4cb9746af07fec689d010
4
+ data.tar.gz: d2b5062651eaa446805266493b366f23d605f212
5
5
  SHA512:
6
- metadata.gz: 04a28357534c8e4fce46577d18c4f73162c05d51da23738313be58e75208f82685f0a6a2e9dbc9051047a153749c06eb1843c596cadd275179185f99fcb65195
7
- data.tar.gz: 51332b4d7be180e55ac61100430a9926e4db30d10d0369c106e6e467d5955aa4599bb77f3ed67a94d57d34e054e23f97c2958e999b23f4b612cec243cc17abe3
6
+ metadata.gz: a642c3d0960d9537c970e7f995c4bbc5479cd6afa31b249ac4f0d47fcbe6006960e7919663397c6f8c4ed481093d8110e3b8c373132b861f55183cacc664486d
7
+ data.tar.gz: 07f5da008f606f5df3f185edfa9b9f4ea788cd75f704e12123942752d8186a0cf1145c1f26a83892a963d9e4109c58fdb5e04669d06b0e817bfd5337d19dd74d
@@ -1,3 +1,6 @@
1
+ === 1.7.7.1 (2014-8-20)
2
+ * Add one remaining ::Logger compat alias RJack::SLF4J::Logger#unknown
3
+
1
4
  === 1.7.7.0 (2014-8-19)
2
5
  * Upgraded to SLF4J 1.7.7
3
6
  * Add check to log exceptions with nil backtrace
@@ -288,6 +288,10 @@ module RJack
288
288
  # a different level.
289
289
  alias << info
290
290
 
291
+ # Alias to #info for Ruby ::Logger compatibility. Extend to map to
292
+ # a different level.
293
+ alias unknown info
294
+
291
295
  # Log via Ruby ::Logger levels, for compatibility.
292
296
  # UNKNOWN or nil level is mapped to #info
293
297
  def add( rlvl, msg = nil, progname = nil, &block )
@@ -28,7 +28,7 @@ module RJack
28
28
  # SLF4J-java version
29
29
  SLF4J_VERSION = '1.7.7'
30
30
  # SLF4J gem version
31
- VERSION = SLF4J_VERSION + '.0'
31
+ VERSION = SLF4J_VERSION + '.1'
32
32
 
33
33
  SLF4J_DIR = File.dirname(__FILE__) # :nodoc:
34
34
 
@@ -183,6 +183,15 @@ class TestCompatibility < MiniTest::Unit::TestCase
183
183
  logger_like?( RJack::SLF4J['compat'] )
184
184
  end
185
185
 
186
+ def test_compare_methods
187
+ File.open( File.expand_path( '../logger.out', __FILE__ ), 'w' ) do |fout|
188
+ r_mths = ::Logger.new( fout ).public_methods.sort
189
+ s_mths = RJack::SLF4J['compat'].public_methods.sort
190
+ assert_equal( [], (r_mths - s_mths),
191
+ "::Logger methods not in SLF4J::Logger" )
192
+ end
193
+ end
194
+
186
195
  def logger_like?( l )
187
196
  assert_equal( ::Logger::DEBUG, l.level )
188
197
  l.level = ::Logger::INFO
@@ -191,7 +200,7 @@ class TestCompatibility < MiniTest::Unit::TestCase
191
200
  l.sev_threshold = ::Logger::INFO
192
201
  assert_equal( ::Logger::INFO, l.sev_threshold )
193
202
 
194
- assert_equal( true, l.info? )
203
+ assert_equal( true, l.info? )
195
204
 
196
205
  assert_equal( true, l.add( ::Logger::INFO, 'message', 'program' ) )
197
206
  assert_equal( true, l.add( ::Logger::INFO, 'message' ) )
@@ -206,6 +215,9 @@ class TestCompatibility < MiniTest::Unit::TestCase
206
215
  assert_equal( true, l.info( RuntimeError.new( "exception" ) ) )
207
216
  assert_equal( true, l.info( RuntimeError.new( "exception" ) ) { "other" } )
208
217
 
218
+ assert_equal( true, l.add( ::Logger::UNKNOWN, 'message' ) )
219
+ l.unknown( 'message' )
220
+
209
221
  l << 'dump'
210
222
 
211
223
  assert_nil( l.datetime_format )
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rjack-slf4j
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.7.0
4
+ version: 1.7.7.1
5
5
  platform: java
6
6
  authors:
7
7
  - David Kellum