Skip to content

Commit 28ad68f

Browse files
committed
switched from log4j to logback
1 parent 132e395 commit 28ad68f

File tree

28 files changed

+124
-253
lines changed

28 files changed

+124
-253
lines changed

Ch04_OutputEscapingJSP/pom.xml

+2-10
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,8 @@
3030
<artifactId>jstl</artifactId>
3131
</dependency>
3232
<dependency>
33-
<groupId>org.slf4j</groupId>
34-
<artifactId>slf4j-api</artifactId>
35-
</dependency>
36-
<dependency>
37-
<groupId>org.slf4j</groupId>
38-
<artifactId>slf4j-log4j12</artifactId>
39-
</dependency>
40-
<dependency>
41-
<groupId>log4j</groupId>
42-
<artifactId>log4j</artifactId>
33+
<groupId>ch.qos.logback</groupId>
34+
<artifactId>logback-classic</artifactId>
4335
</dependency>
4436
<dependency>
4537
<groupId>org.springframework</groupId>

Ch04_OutputEscapingJSP/src/main/resources/log4j.xml

-16
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<configuration>
2+
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
3+
<encoder>
4+
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
5+
</encoder>
6+
</appender>
7+
8+
<root level="INFO">
9+
<appender-ref ref="STDOUT" />
10+
</root>
11+
</configuration>

Ch05_AccessReferenceMaps/pom.xml

+2-10
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,8 @@
3333
<artifactId>hibernate-core</artifactId>
3434
</dependency>
3535
<dependency>
36-
<groupId>org.slf4j</groupId>
37-
<artifactId>slf4j-api</artifactId>
38-
</dependency>
39-
<dependency>
40-
<groupId>org.slf4j</groupId>
41-
<artifactId>slf4j-log4j12</artifactId>
42-
</dependency>
43-
<dependency>
44-
<groupId>log4j</groupId>
45-
<artifactId>log4j</artifactId>
36+
<groupId>ch.qos.logback</groupId>
37+
<artifactId>logback-classic</artifactId>
4638
</dependency>
4739
</dependencies>
4840

Ch05_AccessReferenceMaps/src/main/resources/log4j.xml

-16
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<configuration>
2+
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
3+
<encoder>
4+
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
5+
</encoder>
6+
</appender>
7+
8+
<root level="INFO">
9+
<appender-ref ref="STDOUT" />
10+
</root>
11+
</configuration>

Ch05_HSTS/pom.xml

+4-12
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,14 @@
1515
<description>Chapter 5 HTTP Strict Transport Security (HSTS sample project. Requires a server like Apache Tomcat or the Maven Tomcat plugin. After starting, open the web application in your browser at http://localhost:8080/Ch05_HSTS</description>
1616

1717
<dependencies>
18-
<dependency>
19-
<groupId>org.slf4j</groupId>
20-
<artifactId>slf4j-api</artifactId>
21-
</dependency>
22-
<dependency>
23-
<groupId>org.slf4j</groupId>
24-
<artifactId>slf4j-log4j12</artifactId>
25-
</dependency>
26-
<dependency>
27-
<groupId>log4j</groupId>
28-
<artifactId>log4j</artifactId>
29-
</dependency>
3018
<dependency>
3119
<groupId>javax.servlet</groupId>
3220
<artifactId>javax.servlet-api</artifactId>
3321
</dependency>
22+
<dependency>
23+
<groupId>ch.qos.logback</groupId>
24+
<artifactId>logback-classic</artifactId>
25+
</dependency>
3426
</dependencies>
3527

3628
<build>

Ch05_HSTS/src/main/resources/log4j.xml

-16
This file was deleted.
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<configuration>
2+
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
3+
<encoder>
4+
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
5+
</encoder>
6+
</appender>
7+
8+
<root level="INFO">
9+
<appender-ref ref="STDOUT" />
10+
</root>
11+
</configuration>

Ch05_SessionFixation/pom.xml

+2-10
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,8 @@
1717
<artifactId>javax.servlet-api</artifactId>
1818
</dependency>
1919
<dependency>
20-
<groupId>org.slf4j</groupId>
21-
<artifactId>slf4j-api</artifactId>
22-
</dependency>
23-
<dependency>
24-
<groupId>org.slf4j</groupId>
25-
<artifactId>slf4j-log4j12</artifactId>
26-
</dependency>
27-
<dependency>
28-
<groupId>log4j</groupId>
29-
<artifactId>log4j</artifactId>
20+
<groupId>ch.qos.logback</groupId>
21+
<artifactId>logback-classic</artifactId>
3022
</dependency>
3123
</dependencies>
3224

Ch05_SessionFixation/src/main/resources/log4j.xml

-16
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<configuration>
2+
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
3+
<encoder>
4+
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
5+
</encoder>
6+
</appender>
7+
8+
<root level="INFO">
9+
<appender-ref ref="STDOUT" />
10+
</root>
11+
</configuration>

Ch06_SQLInjection/pom.xml

+2-10
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,8 @@
3030
<artifactId>hibernate-core</artifactId>
3131
</dependency>
3232
<dependency>
33-
<groupId>org.slf4j</groupId>
34-
<artifactId>slf4j-api</artifactId>
35-
</dependency>
36-
<dependency>
37-
<groupId>org.slf4j</groupId>
38-
<artifactId>slf4j-log4j12</artifactId>
39-
</dependency>
40-
<dependency>
41-
<groupId>log4j</groupId>
42-
<artifactId>log4j</artifactId>
33+
<groupId>ch.qos.logback</groupId>
34+
<artifactId>logback-classic</artifactId>
4335
</dependency>
4436
</dependencies>
4537

Ch06_SQLInjection/src/main/resources/log4j.xml

-16
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<configuration>
2+
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
3+
<encoder>
4+
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
5+
</encoder>
6+
</appender>
7+
8+
<root level="INFO">
9+
<appender-ref ref="STDOUT" />
10+
</root>
11+
</configuration>

Ch06_XPathInjection/pom.xml

+2-10
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,8 @@
2222
<artifactId>esapi</artifactId>
2323
</dependency>
2424
<dependency>
25-
<groupId>org.slf4j</groupId>
26-
<artifactId>slf4j-api</artifactId>
27-
</dependency>
28-
<dependency>
29-
<groupId>org.slf4j</groupId>
30-
<artifactId>slf4j-log4j12</artifactId>
31-
</dependency>
32-
<dependency>
33-
<groupId>log4j</groupId>
34-
<artifactId>log4j</artifactId>
25+
<groupId>ch.qos.logback</groupId>
26+
<artifactId>logback-classic</artifactId>
3527
</dependency>
3628
</dependencies>
3729

Ch06_XPathInjection/src/main/resources/log4j.xml

-16
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<configuration>
2+
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
3+
<encoder>
4+
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
5+
</encoder>
6+
</appender>
7+
8+
<root level="INFO">
9+
<appender-ref ref="STDOUT" />
10+
</root>
11+
</configuration>

Ch07_CSP/pom.xml

+2-10
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,8 @@
2424
<artifactId>json-io</artifactId>
2525
</dependency>
2626
<dependency>
27-
<groupId>org.slf4j</groupId>
28-
<artifactId>slf4j-api</artifactId>
29-
</dependency>
30-
<dependency>
31-
<groupId>org.slf4j</groupId>
32-
<artifactId>slf4j-log4j12</artifactId>
33-
</dependency>
34-
<dependency>
35-
<groupId>log4j</groupId>
36-
<artifactId>log4j</artifactId>
27+
<groupId>ch.qos.logback</groupId>
28+
<artifactId>logback-classic</artifactId>
3729
</dependency>
3830
</dependencies>
3931

Ch07_CSP/src/main/resources/log4j.xml

-16
This file was deleted.
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<configuration>
2+
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
3+
<encoder>
4+
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
5+
</encoder>
6+
</appender>
7+
8+
<root level="INFO">
9+
<appender-ref ref="STDOUT" />
10+
</root>
11+
</configuration>

Ch07_XSS/pom.xml

+2-10
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,8 @@
3131
<artifactId>h2</artifactId>
3232
</dependency>
3333
<dependency>
34-
<groupId>org.slf4j</groupId>
35-
<artifactId>slf4j-api</artifactId>
36-
</dependency>
37-
<dependency>
38-
<groupId>org.slf4j</groupId>
39-
<artifactId>slf4j-log4j12</artifactId>
40-
</dependency>
41-
<dependency>
42-
<groupId>log4j</groupId>
43-
<artifactId>log4j</artifactId>
34+
<groupId>ch.qos.logback</groupId>
35+
<artifactId>logback-classic</artifactId>
4436
</dependency>
4537
<dependency>
4638
<groupId>org.apache.commons</groupId>

Ch07_XSS/src/main/resources/log4j.xml

-16
This file was deleted.

0 commit comments

Comments
 (0)