You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by xx...@apache.org on 2021/07/12 05:36:16 UTC

[kylin] branch master updated: add stream-receiver log configuration to the conf dir

This is an automated email from the ASF dual-hosted git repository.

xxyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kylin.git


The following commit(s) were added to refs/heads/master by this push:
     new 6b1a22a  add stream-receiver log configuration to the conf dir
6b1a22a is described below

commit 6b1a22a7ad33a4e0413ab6b0dd717ab4535bb0a4
Author: liukun4515 <li...@apache.org>
AuthorDate: Wed Jul 7 11:26:20 2021 +0800

    add stream-receiver log configuration to the conf dir
---
 build/bin/kylin.sh                          |  6 ++--
 build/conf/stream-receiver-log4j.properties | 44 +++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+), 3 deletions(-)

diff --git a/build/bin/kylin.sh b/build/bin/kylin.sh
index 4079525..6770527 100755
--- a/build/bin/kylin.sh
+++ b/build/bin/kylin.sh
@@ -288,7 +288,7 @@ then
 
         # KYLIN_EXTRA_START_OPTS is for customized settings, checkout bin/setenv.sh
         ${JAVA_HOME}/bin/java -cp $STREAM_CLASSPATH ${KYLIN_EXTRA_START_OPTS} \
-        -Dlog4j.configuration=stream-receiver-log4j.properties\
+        -Dlog4j.configuration=file:${KYLIN_HOME}/conf/stream-receiver-log4j.properties\
         -DKYLIN_HOME=${KYLIN_HOME}\
         -Dkylin.hbase.dependency=${hbase_dependency} \
         org.apache.kylin.stream.server.StreamingReceiver $@ > ${KYLIN_HOME}/logs/streaming_receiver.out 2>&1 & echo $! > ${KYLIN_HOME}/streaming_receiver_pid &
@@ -318,7 +318,7 @@ then
 
         # KYLIN_EXTRA_START_OPTS is for customized settings, checkout bin/setenv.sh
         ${JAVA_HOME}/bin/java -cp $STREAM_CLASSPATH ${KYLIN_EXTRA_START_OPTS} \
-        -Dlog4j.configuration=stream-receiver-log4j.properties\
+        -Dlog4j.configuration=file:${KYLIN_HOME}/conf/stream-receiver-log4j.properties\
         -DKYLIN_HOME=${KYLIN_HOME}\
         -Dkylin.hbase.dependency=${hbase_dependency} \
         org.apache.kylin.stream.server.StreamingReceiver $@
@@ -385,7 +385,7 @@ then
         shift
         # KYLIN_EXTRA_START_OPTS is for customized settings, checkout bin/setenv.sh
         ${JAVA_HOME}/bin/java -cp $STREAM_CLASSPATH ${KYLIN_EXTRA_START_OPTS} \
-        -Dlog4j.configuration=stream-receiver-log4j.properties\
+        -Dlog4j.configuration=file:${KYLIN_HOME}/conf/stream-receiver-log4j.properties\
         -DKYLIN_HOME=${KYLIN_HOME}\
         -Dkylin.hbase.dependency=${hbase_dependency} \
         "$@"
diff --git a/build/conf/stream-receiver-log4j.properties b/build/conf/stream-receiver-log4j.properties
new file mode 100644
index 0000000..a48b996
--- /dev/null
+++ b/build/conf/stream-receiver-log4j.properties
@@ -0,0 +1,44 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (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.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+
+#define appenders
+log4j.appender.file=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.file.layout=org.apache.log4j.PatternLayout
+log4j.appender.file.File=${KYLIN_HOME}/logs/kylin_streaming_receiver.log
+log4j.appender.file.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c{2}:%L : %m%n
+log4j.appender.file.Append=true
+
+
+log4j.appender.statechange=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.statechange.layout=org.apache.log4j.PatternLayout
+log4j.appender.statechange.File=${KYLIN_HOME}/logs/kylin_streaming_statechange.log
+log4j.appender.statechange.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c{2}:%L : %m%n
+log4j.appender.statechange.Append=true
+
+#overall config
+log4j.rootLogger=INFO,file
+log4j.logger.org.apache.kylin=DEBUG
+log4j.logger.io.ebay.rheos.kafka.security.iaf=DEBUG
+log4j.logger.org.springframework=WARN
+log4j.logger.org.springframework.security=INFO
+
+#statechange config
+log4j.logger.org.apache.kylin.stream.server.StreamingServer=DEBUG, statechange
+log4j.logger.org.apache.kylin.stream.server.ReplicaSetLeaderSelector=DEBUG, statechange
+log4j.logger.org.apache.kylin.stream.server.rest.controller.AdminController=DEBUG, statechange
+log4j.logger.org.apache.kylin.stream.core.storage.StreamingSegmentManager=DEBUG, statechange
\ No newline at end of file