Skip to content

Commit 1072aed

Browse files
authored
SAMZA-2746: Allow customizable log4j configuration file (apache#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 :=
1 parent 9f36e72 commit 1072aed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

samza-shell/src/main/bash/run-class.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ fi
3939
HADOOP_YARN_HOME="${HADOOP_YARN_HOME:-$HOME/.samza}"
4040
HADOOP_CONF_DIR="${HADOOP_CONF_DIR:-$HADOOP_YARN_HOME/conf}"
4141
GC_LOG_ROTATION_OPTS="-XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=10241024"
42-
LOG4J_FILE_NAME="log4j.xml"
43-
LOG4J2_FILE_NAME="log4j2.xml"
42+
LOG4J_FILE_NAME="${LOG4J_FILE_NAME:-log4j.xml}"
43+
LOG4J2_FILE_NAME="${LOG4J2_FILE_NAME:-log4j2.xml}"
4444
BASE_LIB_DIR="$base_dir/lib"
4545
DEFAULT_LOG4J_FILE=$BASE_LIB_DIR/$LOG4J_FILE_NAME
4646
DEFAULT_LOG4J2_FILE=$BASE_LIB_DIR/$LOG4J2_FILE_NAME

0 commit comments

Comments
 (0)