Don't log content of module.xml when Logger is not initialized

When Logger is not initialized it returns default logger which prints to stdout and stderr,
so it can lead to different results when run CLI tests locally and on TC.
This commit is contained in:
Zalim Bashorov
2017-04-11 15:17:16 +03:00
parent 43c084fde3
commit 56d3f90a02
2 changed files with 1 additions and 23 deletions
@@ -169,7 +169,7 @@ public class CompileEnvironmentUtil {
String message = "Source file or directory not found: " + sourceRootPath;
File moduleFilePath = configuration.get(JVMConfigurationKeys.MODULE_XML_FILE);
if (moduleFilePath != null) {
if (moduleFilePath != null && Logger.isInitialized()) {
String moduleFileContent = FileUtil.loadFile(moduleFilePath);
LOG.warn(message +
"\n\nmodule file path: " + moduleFilePath +