Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 3 additions & 3 deletions bin/kafka-rest-run-class
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ if [ "x$KAFKAREST_LOG4J_OPTS" = "x" ]; 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.yaml" ]; then # Dev environment
KAFKAREST_LOG4J_OPTS="-Dlog4j.configuration=file:$base_dir/config/log4j2.yaml"
KAFKAREST_LOG4J_OPTS="-Dlog4j2.configurationFile=$base_dir/config/log4j2.yaml"
elif [ -e "$base_dir/etc/kafka-rest/log4j2.yaml" ]; then # Simple zip file layout
KAFKAREST_LOG4J_OPTS="-Dlog4j.configuration=file:$base_dir/etc/kafka-rest/log4j2.yaml"
KAFKAREST_LOG4J_OPTS="-Dlog4j2.configurationFile=$base_dir/etc/kafka-rest/log4j2.yaml"
elif [ -e "/etc/kafka-rest/log4j2.yaml" ]; then # Normal install layout
KAFKAREST_LOG4J_OPTS="-Dlog4j.configuration=file:/etc/kafka-rest/log4j2.yaml"
KAFKAREST_LOG4J_OPTS="-Dlog4j2.configurationFile=/etc/kafka-rest/log4j2.yaml"
fi
fi

Expand Down
6 changes: 3 additions & 3 deletions config/log4j2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ Configuration:
Properties:
Property:
# Fallback if the system property is not set
- name: "kafka-rest.logs.dir"
value: "."
- name: "kafka-rest.log.dir"
value: "./logs"
Appenders:
RollingFile:
name: "file"
fileName: "${sys:kafka-rest.log.dir}/kafka-rest.log"
filePattern: "/kafka-rest.log.%i"
filePattern: "${sys:kafka-rest.log.dir}/kafka-rest.log.%i"
PatternLayout:
pattern: "[%d] %p %m (%c)%n"
Policies:
Expand Down