zentol commented on a change in pull request #11583: [FLINK-16883] Scan
FLINK_CONF directory for available log4j configura…
URL: https://github.com/apache/flink/pull/11583#discussion_r402767124
##########
File path: flink-dist/src/main/flink-bin/bin/flink-console.sh
##########
@@ -58,7 +58,9 @@ esac
FLINK_TM_CLASSPATH=`constructFlinkClassPath`
-log_setting=("-Dlog4j.configuration=file:${FLINK_CONF_DIR}/log4j-console.properties"
"-Dlog4j.configurationFile=file:${FLINK_CONF_DIR}/log4j-console.properties"
"-Dlogback.configurationFile=file:${FLINK_CONF_DIR}/logback-console.xml")
+log4j_config=`findLog4jConfiguration ${FLINK_CONF_DIR}`
+
+log_setting=("-Dlog4j.configuration=file:${log4j_config}"
"-Dlog4j.configurationFile=file:${log4j_config}"
"-Dlogback.configurationFile=file:${FLINK_CONF_DIR}/logback-console.xml")
Review comment:
The goal was to make the scripts less strict when it comes to the file type
(.properties vs .xml). This is more of a concern for log4j since we use a
properties file, whereas xml appears to be the "preferred" way with log4j2.
I haven't heard similar problems existing with logback, but yes, ultimately
it could be done for both frameworks.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services