Repository: kylin
Updated Branches:
  refs/heads/KYLIN-2428 6d5ed7ec1 -> f2f0c7eb0


KYLIN-2428 add kylin-tools-init-log4j for get-properties usage


Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/f2f0c7eb
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/f2f0c7eb
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/f2f0c7eb

Branch: refs/heads/KYLIN-2428
Commit: f2f0c7eb0e2c36198569bc2c0b9b016e2e8a50bb
Parents: 6d5ed7e
Author: Billy Liu <billy...@apache.org>
Authored: Wed Feb 8 14:51:43 2017 +0800
Committer: Billy Liu <billy...@apache.org>
Committed: Wed Feb 8 14:51:43 2017 +0800

----------------------------------------------------------------------
 build/bin/get-properties.sh                  |  2 +-
 build/bin/kylin.sh                           |  2 +-
 build/conf/kylin-tools-init-log4j.properties | 32 +++++++++++++++++++++++
 3 files changed, 34 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/f2f0c7eb/build/bin/get-properties.sh
----------------------------------------------------------------------
diff --git a/build/bin/get-properties.sh b/build/bin/get-properties.sh
index 170442d..4be9740 100755
--- a/build/bin/get-properties.sh
+++ b/build/bin/get-properties.sh
@@ -27,5 +27,5 @@ fi
 
 job_jar=$(ls $KYLIN_HOME/lib/kylin-job-*.jar)
 tool_jar=$(ls $KYLIN_HOME/tool/kylin-tool-*.jar)
-result=`java -cp $job_jar:$tool_jar org.apache.kylin.tool.KylinConfigCLI $1 
2>/dev/null`
+result=`java -cp $job_jar:$tool_jar 
-Dlog4j.configuration=file:${KYLIN_HOME}/conf/kylin-tools-init-log4j.properties 
org.apache.kylin.tool.KylinConfigCLI $1 2>/dev/null`
 echo "$result"

http://git-wip-us.apache.org/repos/asf/kylin/blob/f2f0c7eb/build/bin/kylin.sh
----------------------------------------------------------------------
diff --git a/build/bin/kylin.sh b/build/bin/kylin.sh
index abaca62..d95d4ae 100644
--- a/build/bin/kylin.sh
+++ b/build/bin/kylin.sh
@@ -107,7 +107,7 @@ then
     # KYLIN_EXTRA_START_OPTS is for customized settings, checkout bin/setenv.sh
     hbase ${KYLIN_EXTRA_START_OPTS} \
     -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \
-    -Dlog4j.configuration=kylin-server-log4j.properties \
+    
-Dlog4j.configuration=file:${KYLIN_HOME}/conf/kylin-server-log4j.properties \
     -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true \
     -Dorg.apache.catalina.connector.CoyoteAdapter.ALLOW_BACKSLASH=true \
     -Djava.endorsed.dirs=${tomcat_root}/endorsed  \

http://git-wip-us.apache.org/repos/asf/kylin/blob/f2f0c7eb/build/conf/kylin-tools-init-log4j.properties
----------------------------------------------------------------------
diff --git a/build/conf/kylin-tools-init-log4j.properties 
b/build/conf/kylin-tools-init-log4j.properties
new file mode 100644
index 0000000..650745d
--- /dev/null
+++ b/build/conf/kylin-tools-init-log4j.properties
@@ -0,0 +1,32 @@
+#
+# 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.
+#
+
+
+# the kylin-tools-init-log4j.properties is mainly for configuring log 
properties on kylin tools, including:
+#   1. tools launched by get-properties.sh script
+# 
+# It's called kylin-tools-log4j.properties so that it won't distract users 
from the other more important log4j config file: kylin-server-log4j.properties  
+# enable this by -Dlog4j.configuration=kylin-tools-log4j.properties
+
+log4j.rootLogger=INFO,stdout
+
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} %-5p [%t %c{1}:%L]: 
%m%n
+
+log4j.logger.org.apache.kylin=ERROR

Reply via email to