From 4ffed19b04401d0aaeefeb3bb8f73b6f7ede101f Mon Sep 17 00:00:00 2001 From: alexlehm Date: Sun, 2 Apr 2017 15:04:10 +0200 Subject: [PATCH] STORM-2451: windows storm.cmd does not set log4j2 config file correctly by default the dir from the default config is log4j2 and that should be relative to STORM_HOME, however this is check was missing Signed-off-by: alexlehm --- bin/storm-config.cmd | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/bin/storm-config.cmd b/bin/storm-config.cmd index 790b3bea8fd..2d7d3ee786e 100644 --- a/bin/storm-config.cmd +++ b/bin/storm-config.cmd @@ -101,6 +101,16 @@ FOR /F "delims=" %%i in (%CMD_TEMP_FILE%) do ( ) ) +@rem +@rem if we have a dir with relative path, make it absolute +@rem + +if not %STORM_LOG4J2_CONFIGURATION_DIR% == nil ( + if exist %STORM_HOME%\%STORM_LOG4J2_CONFIGURATION_DIR% ( + set STORM_LOG4J2_CONFIGURATION_DIR=%STORM_HOME%\%STORM_LOG4J2_CONFIGURATION_DIR% + ) +) + @rem @rem if STORM_LOG4J2_CONFIGURATION_DIR was defined, also set STORM_LOG4J2_CONFIGURATION_FILE @rem