rjack-logback 0.9.18.1-java → 1.0.0.0-java

Sign up to get free protection for your applications and to get access to all the features.
data/History.rdoc CHANGED
@@ -1,3 +1,21 @@
1
+ === 1.0.0.0 (2010-8-31)
2
+
3
+ The upstream Logback project has introduced several
4
+ non-backward-compatible changes in the 0.9.19+ "patch" series. In the
5
+ interest of gem consumers, breaking with the upstream version scheme
6
+ in this new 1.x major series. Expect reliable semantic versioning from
7
+ here on out: 100% compatible patch releases for ~> 1.0.0 (1.0.1.0 or
8
+ 1.0.0.1).
9
+
10
+ * Upgraded to Logback 0.9.24.
11
+ * Remove Logback from global namespace (was kept deprecated for
12
+ compatibility with move to RJack:: in 0.9.17.1)
13
+ * Logback (as of 0.9.21 actually) now has a hard requirement for
14
+ SLF4J ~> 1.6.0
15
+ * Maintain *Appender compatibility (0.9.19+) by mapping a.encoding=x
16
+ to a.encoder.charset=Charset.forName(x)
17
+ * Remove require 'rubygems' from lib, require 'java' for imports.
18
+
1
19
  === 0.9.18.1 (2010-3-6)
2
20
  * Set gem platform to java
3
21
  * Upgraded to tarpit ~> 1.2.0
data/Manifest.txt CHANGED
@@ -1,14 +1,13 @@
1
- Manifest.static
1
+ History.rdoc
2
2
  Manifest.txt
3
3
  README.rdoc
4
- History.rdoc
5
4
  Rakefile
6
- pom.xml
7
5
  assembly.xml
6
+ pom.xml
8
7
  lib/rjack-logback/base.rb
9
8
  lib/rjack-logback.rb
10
9
  lib/rjack-logback/access.rb
11
10
  test/test_logback.rb
12
- lib/rjack-logback/logback-access-0.9.18.jar
13
- lib/rjack-logback/logback-classic-0.9.18.jar
14
- lib/rjack-logback/logback-core-0.9.18.jar
11
+ lib/rjack-logback/logback-access-0.9.24.jar
12
+ lib/rjack-logback/logback-classic-0.9.24.jar
13
+ lib/rjack-logback/logback-core-0.9.24.jar
data/README.rdoc CHANGED
@@ -13,7 +13,7 @@ packaged in the {slf4j gem}[http://rjack.rubyforge.org/slf4j/].
13
13
  == Synopsis
14
14
 
15
15
  require 'rjack-logback'
16
- RJack::Logback.config_console( :level => Logback:INFO )
16
+ RJack::Logback.config_console( :level => RJack::Logback::INFO )
17
17
 
18
18
  log = RJack::SLF4J[ "my.app.logger" ]
19
19
  log.info "Hello World!"
@@ -22,7 +22,7 @@ packaged in the {slf4j gem}[http://rjack.rubyforge.org/slf4j/].
22
22
 
23
23
  === rjack-logback gem
24
24
 
25
- Copyright (c) 2008-2009 David Kellum
25
+ Copyright (c) 2008-2010 David Kellum
26
26
 
27
27
  rjack-logback is free software: you can redistribute it and/or
28
28
  modify it under the terms of either of following licenses:
data/Rakefile CHANGED
@@ -1,17 +1,4 @@
1
1
  # -*- ruby -*-
2
- #--
3
- # Copyright (C) 2008-2009 David Kellum
4
- #
5
- # rjack-logback is free software: you can redistribute it and/or
6
- # modify it under the terms of either of following licenses:
7
- #
8
- # GNU Lesser General Public License v3 or later
9
- # Eclipse Public License v1.0
10
- #
11
- # rjack-logback is distributed in the hope that it will be useful, but
12
- # WITHOUT ANY WARRANTY; without even the implied warranty of
13
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14
- #++
15
2
 
16
3
  $LOAD_PATH << './lib'
17
4
  require 'rjack-logback/base'
@@ -26,7 +13,7 @@ t = TarPit.new( 'rjack-logback', Logback::VERSION, :java_platform )
26
13
 
27
14
  t.specify do |h|
28
15
  h.developer( "David Kellum", "dek-oss@gravitext.com" )
29
- h.extra_deps << [ 'rjack-slf4j', '~> 1.5.8' ]
16
+ h.extra_deps << [ 'rjack-slf4j', '~> 1.6.0' ]
30
17
  h.rubyforge_name = "rjack"
31
18
  h.remote_rdoc_dir = "logback"
32
19
  end
data/lib/rjack-logback.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (C) 2008-2009 David Kellum
2
+ # Copyright (c) 2008-2010 David Kellum
3
3
  #
4
4
  # rjack-logback is free software: you can redistribute it and/or
5
5
  # modify it under the terms of either of following licenses:
@@ -12,14 +12,10 @@
12
12
  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
13
  #++
14
14
 
15
- require 'rubygems'
16
- require 'java'
17
-
18
15
  require 'rjack-slf4j'
19
16
  require 'rjack-logback/base'
20
17
 
21
- # Backward compatibility for top level ::Logback module
22
- Logback = RJack::Logback
18
+ require 'java'
23
19
 
24
20
  module RJack
25
21
 
@@ -31,8 +27,7 @@ module RJack
31
27
  # === High level configuration
32
28
  #
33
29
  # require 'rjack-logback'
34
- #
35
- # RJack::Logback.config_console( :thread => true, :level => Logback:INFO )
30
+ # RJack::Logback.config_console( :thread => true, :level => RJack::Logback::INFO )
36
31
  #
37
32
  # === Low level configuration
38
33
  #
@@ -49,11 +44,11 @@ module RJack
49
44
  # end
50
45
  # end
51
46
  # RJack::Logback.root.add_appender( console )
52
- # RJack::Logback.root.level = Logback::INFO
47
+ # RJack::Logback.root.level = RJack::Logback::INFO
53
48
  # end
54
49
  #
55
50
  # # Adjust output levels (also works outside of configure )
56
- # RJack::Logback[ 'example' ].level = Logback::DEBUG
51
+ # RJack::Logback[ 'example' ].level = RJack::Logback::DEBUG
57
52
  #
58
53
  # log.debug "...after reconfigure."
59
54
  #
@@ -189,6 +184,8 @@ module RJack
189
184
  module AppenderUtil
190
185
  @@default_layout = Logback::PatternLayout.new
191
186
 
187
+ Charset = Java::java.nio.charset.Charset
188
+
192
189
  # Set appender defaults.
193
190
  def set_defaults
194
191
  self.context = Logback.context
@@ -201,6 +198,10 @@ module RJack
201
198
  block.call( self ) unless block.nil?
202
199
  Util.start( self )
203
200
  end
201
+
202
+ def encoding=( enc )
203
+ self.encoder.charset = Charset::forName( enc )
204
+ end
204
205
  end
205
206
 
206
207
  # ch.qos.logback.core.ConsoleAppender
@@ -228,14 +229,6 @@ module RJack
228
229
  # ch.qos.logback.core.FileAppender[http://logback.qos.ch/apidocs/ch/qos/logback/core/FileAppender.html]
229
230
  # with a block initializer.
230
231
  #
231
- # Note that if buffered (immediate_flush = false, buffer_size > 0),
232
- # you will need to +stop+ the appender before exiting in order to
233
- # flush/close the log. Calling:
234
- #
235
- # Logback.configure {}
236
- #
237
- # Will also result in the log being flushed and closed.
238
- #
239
232
  class FileAppender < JFileAppender
240
233
  include AppenderUtil
241
234
 
@@ -245,7 +238,6 @@ module RJack
245
238
  set_defaults
246
239
  self.file = file_name
247
240
  self.append = append
248
- self.immediate_flush = true #default
249
241
  self.encoding = "UTF-8"
250
242
  finish( &block )
251
243
  end
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (C) 2008-2009 David Kellum
2
+ # Copyright (c) 2008-2010 David Kellum
3
3
  #
4
4
  # rjack-logback is free software: you can redistribute it and/or
5
5
  # modify it under the terms of either of following licenses:
@@ -15,10 +15,10 @@
15
15
  module RJack
16
16
  module Logback
17
17
  # Logback java version
18
- LOGBACK_VERSION = '0.9.18'
18
+ LOGBACK_VERSION = '0.9.24'
19
19
 
20
20
  # Logback gem version
21
- VERSION = LOGBACK_VERSION + '.1'
21
+ VERSION = '1.0.0.0'
22
22
 
23
23
  LOGBACK_DIR = File.dirname(__FILE__) # :nodoc:
24
24
  end
data/pom.xml CHANGED
@@ -12,14 +12,14 @@
12
12
  <dependency>
13
13
  <groupId>ch.qos.logback</groupId>
14
14
  <artifactId>logback-classic</artifactId>
15
- <version>0.9.18</version>
15
+ <version>0.9.24</version>
16
16
  <scope>runtime</scope>
17
17
  </dependency>
18
18
 
19
19
  <dependency>
20
20
  <groupId>ch.qos.logback</groupId>
21
21
  <artifactId>logback-access</artifactId>
22
- <version>0.9.18</version>
22
+ <version>0.9.24</version>
23
23
  <scope>runtime</scope>
24
24
  </dependency>
25
25
 
data/test/test_logback.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env jruby
2
2
  #--
3
- # Copyright (C) 2008-2009 David Kellum
3
+ # Copyright (c) 2008-2010 David Kellum
4
4
  #
5
5
  # rjack-logback is free software: you can redistribute it and/or
6
6
  # modify it under the terms of either of following licenses:
@@ -14,7 +14,7 @@
14
14
  #++
15
15
 
16
16
  require 'rubygems'
17
- gem( 'rjack-slf4j', '~> 1.5.8' )
17
+ gem( 'rjack-slf4j', '~> 1.6.0' )
18
18
  require 'rjack-slf4j'
19
19
 
20
20
  $LOAD_PATH.unshift File.join( File.dirname(__FILE__), "..", "lib" )
@@ -55,6 +55,7 @@ class TestAppender
55
55
  end
56
56
 
57
57
  class TestLevelSet < Test::Unit::TestCase
58
+ include RJack
58
59
 
59
60
  def setup
60
61
  @appender = TestAppender.new
@@ -101,6 +102,7 @@ class TestLevelSet < Test::Unit::TestCase
101
102
  end
102
103
 
103
104
  class TestConfigure < Test::Unit::TestCase
105
+ include RJack
104
106
 
105
107
  def test_file_appender_config
106
108
  log_file = "./test_appends.test_file_appender.log"
@@ -108,7 +110,6 @@ class TestConfigure < Test::Unit::TestCase
108
110
  Logback.configure do
109
111
  appender = Logback::FileAppender.new( log_file, false ) do |a|
110
112
  a.layout = Logback::PatternLayout.new( "%level-%msg" )
111
- a.immediate_flush = true
112
113
  a.encoding = "ISO-8859-1"
113
114
  end
114
115
  Logback.root.add_appender( appender )
@@ -138,7 +139,6 @@ class TestConfigure < Test::Unit::TestCase
138
139
  appender = TestAppender.new
139
140
  Logback.configure do
140
141
  console = Logback::ConsoleAppender.new do |a|
141
- a.immediate_flush = true
142
142
  a.encoding = "UTF-8"
143
143
  a.target = "System.out"
144
144
  end
metadata CHANGED
@@ -1,7 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rjack-logback
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.18.1
4
+ prerelease: false
5
+ segments:
6
+ - 1
7
+ - 0
8
+ - 0
9
+ - 0
10
+ version: 1.0.0.0
5
11
  platform: java
6
12
  authors:
7
13
  - David Kellum
@@ -9,29 +15,37 @@ autorequire:
9
15
  bindir: bin
10
16
  cert_chain: []
11
17
 
12
- date: 2010-03-06 00:00:00 -08:00
18
+ date: 2010-08-31 00:00:00 -07:00
13
19
  default_executable:
14
20
  dependencies:
15
21
  - !ruby/object:Gem::Dependency
16
22
  name: rjack-slf4j
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
20
25
  requirements:
21
26
  - - ~>
22
27
  - !ruby/object:Gem::Version
23
- version: 1.5.8
24
- version:
28
+ segments:
29
+ - 1
30
+ - 6
31
+ - 0
32
+ version: 1.6.0
33
+ type: :runtime
34
+ version_requirements: *id001
25
35
  - !ruby/object:Gem::Dependency
26
36
  name: rjack-tarpit
27
- type: :development
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
37
+ prerelease: false
38
+ requirement: &id002 !ruby/object:Gem::Requirement
30
39
  requirements:
31
40
  - - ~>
32
41
  - !ruby/object:Gem::Version
33
- version: 1.2.0
34
- version:
42
+ segments:
43
+ - 1
44
+ - 2
45
+ - 2
46
+ version: 1.2.2
47
+ type: :development
48
+ version_requirements: *id002
35
49
  description: |-
36
50
  The Logback ruby gem packages the Logback[http://logback.qos.ch/] java log
37
51
  writer, and provides a JRuby facade for programmatic Logback
@@ -45,23 +59,22 @@ extensions: []
45
59
 
46
60
  extra_rdoc_files:
47
61
  - Manifest.txt
48
- - README.rdoc
49
62
  - History.rdoc
63
+ - README.rdoc
50
64
  files:
51
- - Manifest.static
65
+ - History.rdoc
52
66
  - Manifest.txt
53
67
  - README.rdoc
54
- - History.rdoc
55
68
  - Rakefile
56
- - pom.xml
57
69
  - assembly.xml
70
+ - pom.xml
58
71
  - lib/rjack-logback/base.rb
59
72
  - lib/rjack-logback.rb
60
73
  - lib/rjack-logback/access.rb
61
74
  - test/test_logback.rb
62
- - lib/rjack-logback/logback-access-0.9.18.jar
63
- - lib/rjack-logback/logback-classic-0.9.18.jar
64
- - lib/rjack-logback/logback-core-0.9.18.jar
75
+ - lib/rjack-logback/logback-access-0.9.24.jar
76
+ - lib/rjack-logback/logback-classic-0.9.24.jar
77
+ - lib/rjack-logback/logback-core-0.9.24.jar
65
78
  has_rdoc: true
66
79
  homepage: http://rjack.rubyforge.org
67
80
  licenses: []
@@ -76,18 +89,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
76
89
  requirements:
77
90
  - - ">="
78
91
  - !ruby/object:Gem::Version
92
+ segments:
93
+ - 0
79
94
  version: "0"
80
- version:
81
95
  required_rubygems_version: !ruby/object:Gem::Requirement
82
96
  requirements:
83
97
  - - ">="
84
98
  - !ruby/object:Gem::Version
99
+ segments:
100
+ - 0
85
101
  version: "0"
86
- version:
87
102
  requirements: []
88
103
 
89
104
  rubyforge_project: rjack
90
- rubygems_version: 1.3.5
105
+ rubygems_version: 1.3.6
91
106
  signing_key:
92
107
  specification_version: 3
93
108
  summary: The Logback ruby gem packages the Logback[http://logback.qos.ch/] java log writer, and provides a JRuby facade for programmatic Logback setup
data/Manifest.static DELETED
@@ -1,11 +0,0 @@
1
- Manifest.static
2
- Manifest.txt
3
- README.rdoc
4
- History.rdoc
5
- Rakefile
6
- pom.xml
7
- assembly.xml
8
- lib/rjack-logback/base.rb
9
- lib/rjack-logback.rb
10
- lib/rjack-logback/access.rb
11
- test/test_logback.rb