Skip to content
This repository was archived by the owner on Oct 10, 2025. It is now read-only.

Commit ccf95dd

Browse files
authored
Merge pull request #130 from zhicwu/remove-log4j
prepare 2.0.7
2 parents c599c36 + 45b9c68 commit ccf95dd

File tree

12 files changed

+36
-71
lines changed

12 files changed

+36
-71
lines changed

NOTICE

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ under the License.
1919

2020
This project includes:
2121
Apache Commons Compress under Apache License, Version 2.0
22-
Apache Log4j under The Apache Software License, Version 2.0
2322
Caffeine cache under Apache License, Version 2.0
2423
Checker Qual under The MIT License
2524
ClickHouse JDBC Bridge under Apache License, Version 2.0
@@ -56,7 +55,7 @@ This project includes:
5655
Prometheus Java Simpleclient under The Apache Software License, Version 2.0
5756
Prometheus Java Simpleclient Common under The Apache Software License, Version 2.0
5857
SLF4J API Module under MIT License
59-
SLF4J LOG4J-12 Binding under MIT License
58+
SLF4J JDK14 Binding under MIT License
6059
Testcontainers Core under MIT
6160
testng under Apache 2.0
6261
Vert.x Bridge Common under The Apache Software License, Version 2.0 or Eclipse Public License - v 1.0

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ Assuming you started a test environment using docker-compose, please refer to ex
286286
287287
* Logging
288288
289-
You can customize logging configuration in [log4j.properties](docker/log4j.properties).
289+
You can customize logging configuration in [logging.properties](docker/logging.properties).
290290
291291
* Vert.x
292292

docker/docker-entrypoint.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ start_server() {
2424
local classpath="./clickhouse-jdbc-bridge-shaded.jar:$(echo $(ls ${DRIVER_DIR:="drivers"}/*.jar) | tr ' ' ':'):."
2525
java -XX:+UseContainerSupport -XX:+IdleTuningCompactOnIdle -XX:+IdleTuningGcOnIdle \
2626
-Xdump:none -Xdump:tool:events=systhrow+throw,filter=*OutOfMemoryError,exec="kill -9 %pid" \
27-
-Dlog4j.configuration=file:///$JDBC_BRIDGE_HOME/log4j.properties -Dnashorn.args=--language=es6 \
27+
-Djava.util.logging.config.file=$JDBC_BRIDGE_HOME/logging.properties -Dnashorn.args=--language=es6 \
2828
${JDBC_BRIDGE_JVM_OPTS:=""} -cp $classpath ru.yandex.clickhouse.jdbcbridge.JdbcBridgeVerticle
2929
else
3030
java -XX:+UseContainerSupport -XX:+IdleTuningCompactOnIdle -XX:+IdleTuningGcOnIdle \
3131
-Xdump:none -Xdump:tool:events=systhrow+throw,filter=*OutOfMemoryError,exec="kill -9 %pid" \
32-
-Dlog4j.configuration=file:///$JDBC_BRIDGE_HOME/log4j.properties -Dnashorn.args=--language=es6 \
32+
-Djava.util.logging.config.file=$JDBC_BRIDGE_HOME/logging.properties -Dnashorn.args=--language=es6 \
3333
${JDBC_BRIDGE_JVM_OPTS:=""} -jar clickhouse-jdbc-bridge-shaded.jar
3434
fi
3535
}

docker/log4j.properties

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

docker/logging.properties

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
handlers=java.util.logging.FileHandler, java.util.logging.ConsoleHandler
2+
3+
java.util.logging.ConsoleHandler.level=DEBUG
4+
java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
5+
java.util.logging.SimpleFormatter.format=[%1$tF %1$tT] [%4$-7s] %5$s %n
6+
7+
java.util.logging.FileHandler.level=INFO
8+
java.util.logging.FileHandler.pattern=/var/log/clickhouse-jdbc-bridge/console.log
9+
java.util.logging.FileHandler.limit=10000000
10+
java.util.logging.FileHandler.count=5
11+
java.util.logging.FileHandler.formatter=java.util.logging.SimpleFormatter
12+
java.util.logging.SimpleFormatter.format=[%1$tF %1$tT] [%4$-7s] %5$s %n
13+
14+
.level=DEBUG

misc/license-mappings.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -532,11 +532,6 @@
532532
<artifactId>slf4j-api</artifactId>
533533
<license>MIT License</license>
534534
</artifact>
535-
<artifact>
536-
<groupId>org.slf4j</groupId>
537-
<artifactId>slf4j-log4j12</artifactId>
538-
<license>MIT License</license>
539-
</artifact>
540535
<artifact>
541536
<groupId>org.slf4j</groupId>
542537
<artifactId>slf4j-jdk14</artifactId>

pom.xml

Lines changed: 3 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<groupId>ru.yandex.clickhouse</groupId>
66
<artifactId>clickhouse-jdbc-bridge</artifactId>
77
<packaging>jar</packaging>
8-
<version>2.0.6-SNAPSHOT</version>
8+
<version>2.0.7-SNAPSHOT</version>
99
<name>ClickHouse JDBC Bridge</name>
1010
<url>https://github.com/ClickHouse/clickhouse-jdbc-bridge</url>
1111
<description>JDBC bridge for ClickHouse.</description>
@@ -131,7 +131,7 @@
131131
</dependency>
132132
<dependency>
133133
<groupId>org.slf4j</groupId>
134-
<artifactId>slf4j-log4j12</artifactId>
134+
<artifactId>slf4j-jdk14</artifactId>
135135
<version>${slf4j.version}</version>
136136
</dependency>
137137

@@ -301,7 +301,7 @@
301301
<groupname>root</groupname>
302302
<sources>
303303
<source>
304-
<location>docker/log4j.properties</location>
304+
<location>docker/logging.properties</location>
305305
</source>
306306
<source>
307307
<location>docker/set-env.sh.example</location>
@@ -409,29 +409,6 @@
409409
</execution>
410410
</executions>
411411
</plugin>
412-
<plugin>
413-
<groupId>com.google.code.maven-replacer-plugin</groupId>
414-
<artifactId>replacer</artifactId>
415-
<version>${replacer-plugin.version}</version>
416-
<executions>
417-
<execution>
418-
<phase>prepare-package</phase>
419-
<goals>
420-
<goal>replace</goal>
421-
</goals>
422-
</execution>
423-
</executions>
424-
<configuration>
425-
<file>src/main/resources/log4j.properties</file>
426-
<outputFile>target/classes/log4j.properties</outputFile>
427-
<replacements>
428-
<replacement>
429-
<token>org.apache.log4j</token>
430-
<value>${shade.base}.log4j</value>
431-
</replacement>
432-
</replacements>
433-
</configuration>
434-
</plugin>
435412
<plugin>
436413
<groupId>com.mycila</groupId>
437414
<artifactId>license-maven-plugin</artifactId>
@@ -557,10 +534,6 @@
557534
<pattern>com.codahale.metrics</pattern>
558535
<shadedPattern>${shade.base}.metrics</shadedPattern>
559536
</relocation>
560-
<relocation>
561-
<pattern>org.apache.log4j</pattern>
562-
<shadedPattern>${shade.base}.log4j</shadedPattern>
563-
</relocation>
564537
<relocation>
565538
<pattern>org.checkerframework</pattern>
566539
<shadedPattern>${shade.base}.checker</shadedPattern>

src/main/bin/clickhouse-jdbc-bridge

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ start_server() {
6262

6363
echo "Work directory is set to [$WORK_DIRECTORY]"
6464
cd "$WORK_DIRECTORY"
65-
java $JVM_ARGS -Dlog4j.configuration=file:///$WORK_DIRECTORY/log4j.properties \
65+
java $JVM_ARGS -Djava.util.logging.config.file=$WORK_DIRECTORY/logging.properties \
6666
-Duser.dir="$WORK_DIRECTORY" -jar "$APP_PACKAGE"
6767
}
6868

src/main/resources/log4j.properties

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
handlers=java.util.logging.ConsoleHandler
2+
3+
java.util.logging.ConsoleHandler.level=DEBUG
4+
java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
5+
java.util.logging.SimpleFormatter.format=[%1$tF %1$tT] [%4$-7s] %5$s %n
6+
7+
.level=DEBUG

0 commit comments

Comments
 (0)