diff --git a/bin/kafka-rest-run-class b/bin/kafka-rest-run-class index c993f52266..ca26edbac2 100755 --- a/bin/kafka-rest-run-class +++ b/bin/kafka-rest-run-class @@ -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 diff --git a/config/log4j2.yaml b/config/log4j2.yaml index 257ce20af2..69c8724f17 100644 --- a/config/log4j2.yaml +++ b/config/log4j2.yaml @@ -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: