Skip to content

Commit 98bd4ec

Browse files
committed
Remove Log4JLogger
This removes support for the long end-of-life and completely insecure Log4j 1.x Signed-off-by: Chad Wilson <[email protected]>
1 parent 655b59a commit 98bd4ec

File tree

4 files changed

+14
-101
lines changed

4 files changed

+14
-101
lines changed

pom.xml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<artifactId>jruby-rack</artifactId>
1313
<version>1.2.3-SNAPSHOT</version>
1414
<name>JRuby-Rack</name>
15-
<url>http://github.com/jruby/jruby-rack/</url>
15+
<url>https://github.com/jruby/jruby-rack/</url>
1616
<description>
1717
A servlet bridge for (Ruby-based) Rack applications that allow them
1818
to run in Java Application servers using JRuby.
@@ -22,11 +22,12 @@
2222
<jruby.version>9.4.7.0</jruby.version>
2323
<jruby.maven.plugins.version>3.0.3</jruby.maven.plugins.version>
2424
<gem.home>${project.build.directory}/rubygems</gem.home>
25+
<slf4j.version>2.0.12</slf4j.version>
2526
</properties>
2627

2728
<issueManagement>
2829
<system>Github</system>
29-
<url>http://github.com/jruby/jruby-rack/issues</url>
30+
<url>https://github.com/jruby/jruby-rack/issues</url>
3031
</issueManagement>
3132

3233
<distributionManagement>
@@ -43,14 +44,14 @@
4344
<scm>
4445
<connection>scm:git:git://github.com/jruby/jruby-rack.git</connection>
4546
<developerConnection>scm:git:[email protected]:jruby/jruby-rack.git</developerConnection>
46-
<url>http://github.com/jruby/jruby-rack/</url>
47+
<url>https://github.com/jruby/jruby-rack/</url>
4748
<tag>HEAD</tag>
4849
</scm>
4950

5051
<licenses>
5152
<license>
5253
<name>MIT License</name>
53-
<url>http://www.opensource.org/licenses/mit-license.php</url>
54+
<url>https://www.opensource.org/licenses/mit-license.php</url>
5455
<distribution>repo</distribution>
5556
</license>
5657
</licenses>
@@ -123,21 +124,21 @@
123124
</dependency>
124125
<dependency>
125126
<groupId>commons-logging</groupId>
126-
<artifactId>commons-logging-api</artifactId>
127-
<version>1.1</version>
127+
<artifactId>commons-logging</artifactId>
128+
<version>1.3.3</version>
128129
<scope>provided</scope>
129130
</dependency>
130131
<dependency>
131132
<groupId>org.slf4j</groupId>
132133
<artifactId>slf4j-api</artifactId>
133-
<version>1.7.2</version>
134+
<version>${slf4j.version}</version>
134135
<scope>provided</scope>
135136
</dependency>
136137
<dependency>
137-
<groupId>log4j</groupId>
138-
<artifactId>log4j</artifactId>
139-
<version>1.2.17</version>
140-
<scope>provided</scope>
138+
<groupId>org.slf4j</groupId>
139+
<artifactId>slf4j-simple</artifactId>
140+
<version>${slf4j.version}</version>
141+
<scope>test</scope>
141142
</dependency>
142143
<dependency>
143144
<groupId>org.springframework</groupId>

src/main/java/org/jruby/rack/DefaultRackConfig.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,6 @@ private static Map<String,String> getLoggerTypes() {
460460
final Map<String,String> loggerTypes = new HashMap<String, String>(8);
461461
loggerTypes.put("commons_logging", "org.jruby.rack.logging.CommonsLoggingLogger");
462462
loggerTypes.put("clogging", "org.jruby.rack.logging.CommonsLoggingLogger");
463-
loggerTypes.put("log4j", "org.jruby.rack.logging.Log4jLogger");
464463
loggerTypes.put("slf4j", "org.jruby.rack.logging.Slf4jLogger");
465464
loggerTypes.put("jul", "org.jruby.rack.logging.JulLogger");
466465
//loggerTypes.put("servlet_context", "org.jruby.rack.logging.ServletContextLogger");

src/main/java/org/jruby/rack/logging/Log4jLogger.java

Lines changed: 0 additions & 87 deletions
This file was deleted.

src/spec/ruby/rack/config_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@
5454
end
5555

5656
it "constructs a slf4j logger with default logger name" do
57-
java.lang.System.setProperty("jruby.rack.logging", "Log4J")
58-
logger.should be_a(org.jruby.rack.logging.Log4jLogger)
57+
java.lang.System.setProperty("jruby.rack.logging", "slf4j")
58+
logger.should be_a(org.jruby.rack.logging.Slf4jLogger)
5959
logger.logger.name.should == 'jruby.rack'
6060
end
6161

0 commit comments

Comments
 (0)