This is an automated email from the ASF dual-hosted git repository.
kw2542 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/samza.git
The following commit(s) were added to refs/heads/master by this push:
new 1072aede5 SAMZA-2746: Allow customizable log4j configuration file
(#1613)
1072aede5 is described below
commit 1072aede568e2e9bd9d69fada1a9cfbd406abdf0
Author: Ke Wu <[email protected]>
AuthorDate: Mon Jun 6 11:30:41 2022 -0700
SAMZA-2746: Allow customizable log4j configuration file (#1613)
* SAMZA-2746: Allow customizable log4j configuration file
Feature: Allow custome log4j configuration file to use in run-class.sh
Changes: Check existence of bash varibles and defaults to
log4j.xml/log4j2.xml if not set
Tests: Existing tests pass
API changes: N/A
Upgrade Instructions: N/A
Usage Instructions: Set LOG4J_FILE_NAME and/or LOG4J2_FILE_NAME to desired
log4j configuration file before invoking run-class.sh
* Simplify assignment
* Use double quotes and :- instead of :=
---
samza-shell/src/main/bash/run-class.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/samza-shell/src/main/bash/run-class.sh
b/samza-shell/src/main/bash/run-class.sh
index a162ad523..3de6dcf40 100755
--- a/samza-shell/src/main/bash/run-class.sh
+++ b/samza-shell/src/main/bash/run-class.sh
@@ -39,8 +39,8 @@ fi
HADOOP_YARN_HOME="${HADOOP_YARN_HOME:-$HOME/.samza}"
HADOOP_CONF_DIR="${HADOOP_CONF_DIR:-$HADOOP_YARN_HOME/conf}"
GC_LOG_ROTATION_OPTS="-XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10
-XX:GCLogFileSize=10241024"
-LOG4J_FILE_NAME="log4j.xml"
-LOG4J2_FILE_NAME="log4j2.xml"
+LOG4J_FILE_NAME="${LOG4J_FILE_NAME:-log4j.xml}"
+LOG4J2_FILE_NAME="${LOG4J2_FILE_NAME:-log4j2.xml}"
BASE_LIB_DIR="$base_dir/lib"
DEFAULT_LOG4J_FILE=$BASE_LIB_DIR/$LOG4J_FILE_NAME
DEFAULT_LOG4J2_FILE=$BASE_LIB_DIR/$LOG4J2_FILE_NAME