Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions avro-serializer/src/test/resources/log4j2.xml

This file was deleted.

13 changes: 13 additions & 0 deletions avro-serializer/src/test/resources/log4j2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Configuration:
name: Log4j2
Appenders:
Console:
name: stdout
target: SYSTEM_OUT
PatternLayout:
pattern: "[%d] %p %m (%c:%L)%n"
Loggers:
Root:
level: INFO
AppenderRef:
- ref: stdout
65 changes: 0 additions & 65 deletions benchmark/src/main/resources/log4j2.xml

This file was deleted.

84 changes: 84 additions & 0 deletions benchmark/src/main/resources/log4j2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Copyright 2025 Confluent Inc.

# Licensed under the Confluent Community License (the "License"); you may not use
# this file except in compliance with the License. You may obtain a copy of the
# License at

# http://www.confluent.io/confluent-community-license

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.

Configuration:
name: Log4j2
Appenders:
Console:
name: stdout
target: SYSTEM_OUT
PatternLayout:
pattern: "[%d] %p %m (%c:%L)%n"
Loggers:
Root:
level: INFO
AppenderRef:
- ref: stdout
Logger:
# Disable INFO logs from Config classes, which log out their config on each creation
- name: org.apache.kafka.streams.StreamsConfig
level: WARN
- name: io.confluent.kafka.serializers.protobuf.KafkaProtobufSerializerConfig
level: WARN
- name: org.apache.kafka.clients.consumer.ConsumerConfig
level: WARN
- name: org.apache.kafka.clients.admin.AdminClientConfig
level: WARN
- name: io.confluent.connect.protobuf.ProtobufDataConfig
level: WARN
- name: io.confluent.kafka.serializers.KafkaJsonDeserializerConfig
level: WARN
- name: io.confluent.kafka.serializers.json.KafkaJsonSchemaDeserializerConfig
level: WARN
- name: kafka.server.KafkaConfig
level: WARN
- name: org.apache.kafka.connect.json.JsonConverterConfig
level: WARN
- name: io.confluent.connect.protobuf.ProtobufConverterConfig
level: WARN
- name: io.confluent.connect.json.JsonSchemaConverterConfig
level: WARN
- name: io.confluent.kafka.serializers.KafkaAvroSerializerConfig
level: WARN
- name: io.confluent.kafka.serializers.protobuf.KafkaProtobufDeserializerConfig
level: WARN
- name: org.apache.kafka.clients.producer.ProducerConfig
level: WARN
- name: io.confluent.connect.avro.AvroConverterConfig
level: WARN
- name: io.confluent.kafka.serializers.KafkaAvroDeserializerConfig
level: WARN
- name: io.confluent.kafka.serializers.json.KafkaJsonSchemaSerializerConfig
level: WARN
- name: io.confluent.connect.json.JsonSchemaDataConfig
level: WARN
- name: io.confluent.connect.avro.AvroDataConfig
level: WARN
- name: io.confluent.kafka.serializers.KafkaJsonSerializerConfig
level: WARN

# Disable logging of state transitions in KS
- name: org.apache.kafka.streams.KafkaStreams
level: WARN
- name: org.apache.kafka.streams.processor.internals.StreamThread
level: WARN
- name: org.apache.kafka.streams.state.internals.RocksDBTimestampedStore
level: WARN

# Disable logging of App info
- name: org.apache.kafka.common.utils.AppInfoParser
level: WARN

# Disable logging from reflections warning for connect classpath scans
- name: org.reflections
level: ERROR
Copy link

Copilot AI Apr 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing whitespace in the logging level setting might lead to unintended behavior; please trim the extra space.

Suggested change
level: ERROR
level: ERROR

Copilot uses AI. Check for mistakes.
12 changes: 6 additions & 6 deletions bin/schema-registry-run-class
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ fi
if [ -z "$SCHEMA_REGISTRY_LOG4J_OPTS" ]; then
# Test for files from dev -> packages so this will work as expected in dev if you have packages
# installed
if [ -e "$base_dir/config/log4j2.xml" ]; then # Dev environment
LOG4J_DIR="$base_dir/config/log4j2.xml"
elif [ -e "$base_dir/etc/schema-registry/log4j2.xml" ]; then # Simple zip file layout
LOG4J_DIR="$base_dir/etc/schema-registry/log4j2.xml"
elif [ -e "/etc/schema-registry/log4j2.xml" ]; then # Normal install layout
LOG4J_DIR="/etc/schema-registry/log4j2.xml"
if [ -e "$base_dir/config/log4j2.yaml" ]; then # Dev environment
LOG4J_DIR="$base_dir/config/log4j2.yaml"
elif [ -e "$base_dir/etc/schema-registry/log4j2.yaml" ]; then # Simple zip file layout
LOG4J_DIR="$base_dir/etc/schema-registry/log4j2.yaml"
elif [ -e "/etc/schema-registry/log4j2.yaml" ]; then # Normal install layout
LOG4J_DIR="/etc/schema-registry/log4j2.yaml"
fi

# If Cygwin is detected, LOG4J_DIR is converted to Windows format.
Expand Down
6 changes: 3 additions & 3 deletions bin/windows/schema-registry-run-class.bat
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ for %%i in (confluent-common, rest-utils, schema-registry) do (

rem Log4j settings
IF ["%SCHEMA_REGISTRY_LOG4J_OPTS%"] EQU [""] (
if exist %~dp0../../etc/schema-registry/log4j2.xml (
set SCHEMA_REGISTRY_LOG4J_OPTS=-Dlog4j2.configurationFile=%~dp0../../etc/schema-registry/log4j2.xml
if exist %~dp0../../etc/schema-registry/log4j2.yaml (
set SCHEMA_REGISTRY_LOG4J_OPTS=-Dlog4j2.configurationFile=%~dp0../../etc/schema-registry/log4j2.yaml
) else (
set SCHEMA_REGISTRY_LOG4J_OPTS=-Dlog4j2.configurationFile=%BASE_DIR%/config/log4j2.xml
set SCHEMA_REGISTRY_LOG4J_OPTS=-Dlog4j2.configurationFile=%BASE_DIR%/config/log4j2.yaml
)
)

Expand Down
31 changes: 0 additions & 31 deletions config/log4j2.xml

This file was deleted.

39 changes: 39 additions & 0 deletions config/log4j2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
Configuration:
name: Log4j2
Appenders:
RollingFile:
name: file
fileName: "${sys:schema-registry.log.dir}/schema-registry.log"
filePattern: "${sys:schema-registry.log.dir}/schema-registry.log.%i"
PatternLayout:
pattern: "[%d] %p %m (%c:%L)%n"
Policies:
SizeBasedTriggeringPolicy:
size: 100MB
DefaultRolloverStrategy:
max: 10
fileIndex: min
Console:
name: stdout
target: SYSTEM_OUT
PatternLayout:
pattern: "[%d] %p %m (%c:%L)%n"
Loggers:
Root:
level: INFO
AppenderRef:
- ref: file
- ref: stdout
Logger:
- name: org.apache.zookeeper
level: ERROR
AppenderRef:
- ref: stdout
- name: kafka
level: ERROR
AppenderRef:
- ref: stdout
- name: org.apache.kafka
level: ERROR
AppenderRef:
- ref: stdout
25 changes: 0 additions & 25 deletions core/src/main/resources/log4j2.xml

This file was deleted.

30 changes: 30 additions & 0 deletions core/src/main/resources/log4j2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Configuration:
name: Log4j2
Appenders:
Console:
name: stdout
target: SYSTEM_OUT
PatternLayout:
pattern: "[%d] %p %m (%c:%L)%n"
Loggers:
Root:
level: INFO
AppenderRef:
- ref: stdout
Logger:
- name: org.apache.kafka
level: ERROR
AppenderRef:
- ref: stdout
- name: org.apache.zookeeper
level: ERROR
AppenderRef:
- ref: stdout
- name: org.apache.directory
level: ERROR
AppenderRef:
- ref: stdout
- name: kafka
level: ERROR
AppenderRef:
- ref: stdout
43 changes: 0 additions & 43 deletions core/src/test/resources/log4j2.xml

This file was deleted.

Loading