diff --git a/engine/src/main/java/org/apache/hop/pipeline/transform/BaseTransform.java b/engine/src/main/java/org/apache/hop/pipeline/transform/BaseTransform.java
index 622cc93e407..0fe8a432767 100644
--- a/engine/src/main/java/org/apache/hop/pipeline/transform/BaseTransform.java
+++ b/engine/src/main/java/org/apache/hop/pipeline/transform/BaseTransform.java
@@ -145,7 +145,7 @@ public class BaseTransform parentWorkflow;
/** The log channel interface object, used for logging */
- protected ILogChannel log;
+ private ILogChannel log;
/** The log level */
private LogLevel logLevel = DefaultLogLevel.getLogLevel();
diff --git a/plugins/actions/checkfilelocked/src/main/java/org/apache/hop/workflow/actions/checkfilelocked/ActionCheckFilesLocked.java b/plugins/actions/checkfilelocked/src/main/java/org/apache/hop/workflow/actions/checkfilelocked/ActionCheckFilesLocked.java
index ff09e496c4e..ba823e38bc1 100644
--- a/plugins/actions/checkfilelocked/src/main/java/org/apache/hop/workflow/actions/checkfilelocked/ActionCheckFilesLocked.java
+++ b/plugins/actions/checkfilelocked/src/main/java/org/apache/hop/workflow/actions/checkfilelocked/ActionCheckFilesLocked.java
@@ -114,7 +114,7 @@ public Result execute(Result previousResult, int nr) {
} else if (!checkedFiles.isEmpty()) {
oneFileLocked = isOneSpecifiedFileLocked();
} else {
- log.logBasic(
+ logBasic(
"This action didn't execute any locking checks "
+ "as there were no lines to check and no arguments provided.");
}
diff --git a/plugins/actions/createfile/src/main/java/org/apache/hop/workflow/actions/createfile/ActionCreateFile.java b/plugins/actions/createfile/src/main/java/org/apache/hop/workflow/actions/createfile/ActionCreateFile.java
index 411495df660..231f2bea0c9 100644
--- a/plugins/actions/createfile/src/main/java/org/apache/hop/workflow/actions/createfile/ActionCreateFile.java
+++ b/plugins/actions/createfile/src/main/java/org/apache/hop/workflow/actions/createfile/ActionCreateFile.java
@@ -193,7 +193,7 @@ private void addFilenameToResult(
resultFile.setComment("");
result.getResultFiles().put(resultFile.getFile().toString(), resultFile);
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(PKG, "ActionCreateFile.FileAddedToResult", targetFilename));
}
diff --git a/plugins/actions/createfolder/src/main/java/org/apache/hop/workflow/actions/createfolder/ActionCreateFolder.java b/plugins/actions/createfolder/src/main/java/org/apache/hop/workflow/actions/createfolder/ActionCreateFolder.java
index 100d5ff3273..5160d4fcfa4 100644
--- a/plugins/actions/createfolder/src/main/java/org/apache/hop/workflow/actions/createfolder/ActionCreateFolder.java
+++ b/plugins/actions/createfolder/src/main/java/org/apache/hop/workflow/actions/createfolder/ActionCreateFolder.java
@@ -109,7 +109,7 @@ public Result execute(Result previousResult, int nr) {
// Folder already exists: there is no reason to try and create it.
//
result.setResult(true);
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(CONST_FOLDER + realFolderName + "] already exists, not recreating.");
}
}
@@ -118,7 +118,7 @@ public Result execute(Result previousResult, int nr) {
// No Folder yet, create an empty Folder.
folderObject.createFolder();
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(CONST_FOLDER + realFolderName + "] created!");
}
result.setResult(true);
diff --git a/plugins/actions/delay/src/main/java/org/apache/hop/workflow/actions/delay/ActionDelay.java b/plugins/actions/delay/src/main/java/org/apache/hop/workflow/actions/delay/ActionDelay.java
index 54d431fd250..c86b12980e4 100644
--- a/plugins/actions/delay/src/main/java/org/apache/hop/workflow/actions/delay/ActionDelay.java
+++ b/plugins/actions/delay/src/main/java/org/apache/hop/workflow/actions/delay/ActionDelay.java
@@ -141,7 +141,7 @@ public Result execute(Result previousResult, int nr) {
// Let's check the limit time
if ((iMaximumTimeout >= 0) && (now >= (timeStart + iMaximumTimeout))) {
// We have reached the time limit
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(BaseMessages.getString(PKG, "ActionDelay.WaitTimeIsElapsed.Label"));
}
continueLoop = false;
diff --git a/plugins/actions/deletefile/src/main/java/org/apache/hop/workflow/actions/deletefile/ActionDeleteFile.java b/plugins/actions/deletefile/src/main/java/org/apache/hop/workflow/actions/deletefile/ActionDeleteFile.java
index 6155f6afdab..cb677319528 100644
--- a/plugins/actions/deletefile/src/main/java/org/apache/hop/workflow/actions/deletefile/ActionDeleteFile.java
+++ b/plugins/actions/deletefile/src/main/java/org/apache/hop/workflow/actions/deletefile/ActionDeleteFile.java
@@ -119,7 +119,7 @@ public Result execute(Result previousResult, int nr) {
} else {
// File already deleted, no reason to try to delete it
result.setResult(true);
- if (log.isBasic()) {
+ if (isBasic()) {
logBasic(
BaseMessages.getString(
PKG, "ActionDeleteFile.File_Already_Deleted", realFilename));
@@ -134,7 +134,7 @@ public Result execute(Result previousResult, int nr) {
result.setResult(false);
result.setNrErrors(1);
}
- if (log.isBasic()) {
+ if (isBasic()) {
logBasic(BaseMessages.getString(PKG, "ActionDeleteFile.File_Deleted", realFilename));
}
result.setResult(true);
diff --git a/plugins/actions/deletefiles/src/main/java/org/apache/hop/workflow/actions/deletefiles/ActionDeleteFiles.java b/plugins/actions/deletefiles/src/main/java/org/apache/hop/workflow/actions/deletefiles/ActionDeleteFiles.java
index a8f53c4dfa8..5aff2d77cf1 100644
--- a/plugins/actions/deletefiles/src/main/java/org/apache/hop/workflow/actions/deletefiles/ActionDeleteFiles.java
+++ b/plugins/actions/deletefiles/src/main/java/org/apache/hop/workflow/actions/deletefiles/ActionDeleteFiles.java
@@ -162,7 +162,7 @@ public Result execute(Result result, int nr) throws HopException {
result.setResult(false);
result.setNrErrors(1);
- if (argFromPrevious && log.isDetailed()) {
+ if (argFromPrevious && isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG,
@@ -179,7 +179,7 @@ public Result execute(Result result, int nr) throws HopException {
// a root pdi-folder.
// It is much more likely to be a mistake than a desirable action, so we don't delete
// anything
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(BaseMessages.getString(PKG, "ActionDeleteFiles.NoPathProvided"));
}
} else {
@@ -233,7 +233,7 @@ private Multimap populateDataForJobExecution(
String pathToFile = resultRow.getString(0, null);
String fileMask = resultRow.getString(1, null);
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(PKG, "ActionDeleteFiles.ProcessingRow", pathToFile, fileMask));
}
@@ -242,7 +242,7 @@ private Multimap populateDataForJobExecution(
}
} else if (arguments != null) {
for (int i = 0; i < arguments.length; i++) {
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG, "ActionDeleteFiles.ProcessingArg", arguments[i], filemasks[i]));
@@ -264,7 +264,7 @@ boolean processFile(String path, String wildcard, IWorkflowEngine
if (fileFolder.exists()) {
if (fileFolder.getType() == FileType.FOLDER) {
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(BaseMessages.getString(PKG, "ActionDeleteFiles.ProcessingFolder", path));
}
@@ -272,7 +272,7 @@ boolean processFile(String path, String wildcard, IWorkflowEngine
fileFolder.delete(
new TextFileSelector(fileFolder.toString(), wildcard, parentWorkflow));
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG, "ActionDeleteFiles.TotalDeleted", String.valueOf(totalDeleted)));
@@ -280,21 +280,21 @@ boolean processFile(String path, String wildcard, IWorkflowEngine
isDeleted = true;
} else {
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(BaseMessages.getString(PKG, "ActionDeleteFiles.ProcessingFile", path));
}
isDeleted = fileFolder.delete();
if (!isDeleted) {
logError(BaseMessages.getString(PKG, "ActionDeleteFiles.CouldNotDeleteFile", path));
} else {
- if (log.isBasic()) {
+ if (isBasic()) {
logBasic(BaseMessages.getString(PKG, "ActionDeleteFiles.FileDeleted", path));
}
}
}
} else {
// File already deleted, no reason to try to delete it
- if (log.isBasic()) {
+ if (isBasic()) {
logBasic(BaseMessages.getString(PKG, "ActionDeleteFiles.FileAlreadyDeleted", path));
}
isDeleted = true;
@@ -348,7 +348,7 @@ public boolean includeFile(FileSelectInfo info) {
if (includeSubfolders
&& (info.getFile().getType() == FileType.FILE)
&& getFileWildcard(shortFilename, fileWildcard)) {
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG, "ActionDeleteFiles.DeletingFile", info.getFile().toString()));
@@ -359,7 +359,7 @@ && getFileWildcard(shortFilename, fileWildcard)) {
// In the Base Folder...
if ((info.getFile().getType() == FileType.FILE)
&& getFileWildcard(shortFilename, fileWildcard)) {
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG, "ActionDeleteFiles.DeletingFile", info.getFile().toString()));
@@ -369,7 +369,7 @@ && getFileWildcard(shortFilename, fileWildcard)) {
}
}
} catch (Exception e) {
- log.logError(
+ logError(
BaseMessages.getString(PKG, "ActionDeleteFiles.Error.Exception.DeleteProcessError"),
BaseMessages.getString(
PKG,
diff --git a/plugins/actions/deletefolders/src/main/java/org/apache/hop/workflow/actions/deletefolders/ActionDeleteFolders.java b/plugins/actions/deletefolders/src/main/java/org/apache/hop/workflow/actions/deletefolders/ActionDeleteFolders.java
index 9b5d1cae876..6ddba42474e 100644
--- a/plugins/actions/deletefolders/src/main/java/org/apache/hop/workflow/actions/deletefolders/ActionDeleteFolders.java
+++ b/plugins/actions/deletefolders/src/main/java/org/apache/hop/workflow/actions/deletefolders/ActionDeleteFolders.java
@@ -174,7 +174,7 @@ public Result execute(Result result, int nr) throws HopException {
successConditionBrokenExit = false;
nrLimitFolders = Const.toInt(resolve(getLimitFolders()), 10);
- if (argFromPrevious && log.isDetailed()) {
+ if (argFromPrevious && isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG,
@@ -229,7 +229,7 @@ public Result execute(Result result, int nr) throws HopException {
}
}
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed("=======================================");
logDetailed(
BaseMessages.getString(PKG, "ActionDeleteFolders.Log.Info.NrError", "" + nrErrors));
@@ -283,14 +283,14 @@ private boolean deleteFolder(String folderName) {
// the file or folder exists
if (filefolder.getType() == FileType.FOLDER) {
// It's a folder
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(PKG, "ActionDeleteFolders.ProcessingFolder", folderName));
}
// Delete Files
int count = filefolder.delete(new TextFileSelector());
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG, "ActionDeleteFolders.TotalDeleted", folderName, String.valueOf(count)));
@@ -302,7 +302,7 @@ private boolean deleteFolder(String folderName) {
}
} else {
// File already deleted, no reason to try to delete it
- if (log.isBasic()) {
+ if (isBasic()) {
logBasic(
BaseMessages.getString(PKG, "ActionDeleteFolders.FolderAlreadyDeleted", folderName));
}
diff --git a/plugins/actions/deleteresultfilenames/src/main/java/org/apache/hop/workflow/actions/deleteresultfilenames/ActionDeleteResultFilenames.java b/plugins/actions/deleteresultfilenames/src/main/java/org/apache/hop/workflow/actions/deleteresultfilenames/ActionDeleteResultFilenames.java
index 481aa7eac29..88647f025da 100644
--- a/plugins/actions/deleteresultfilenames/src/main/java/org/apache/hop/workflow/actions/deleteresultfilenames/ActionDeleteResultFilenames.java
+++ b/plugins/actions/deleteresultfilenames/src/main/java/org/apache/hop/workflow/actions/deleteresultfilenames/ActionDeleteResultFilenames.java
@@ -156,14 +156,14 @@ public Result execute(Result previousResult, int nr) {
if (previousResult != null) {
try {
int size = previousResult.getResultFiles().size();
- if (log.isBasic()) {
+ if (isBasic()) {
logBasic(
BaseMessages.getString(PKG, "ActionDeleteResultFilenames.log.FilesFound", "" + size));
}
if (!specifyWildcard) {
// Delete all files
previousResult.getResultFiles().clear();
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG, "ActionDeleteResultFilenames.log.DeletedFiles", "" + size));
@@ -183,7 +183,7 @@ public Result execute(Result previousResult, int nr) {
// Remove file from result files list
result.getResultFiles().remove(resultFile.getFile().toString());
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG, "ActionDeleteResultFilenames.log.DeletedFile", file.toString()));
diff --git a/plugins/actions/evalfilesmetrics/src/main/java/org/apache/hop/workflow/actions/evalfilesmetrics/ActionEvalFilesMetrics.java b/plugins/actions/evalfilesmetrics/src/main/java/org/apache/hop/workflow/actions/evalfilesmetrics/ActionEvalFilesMetrics.java
index d012cf7989b..8bc5348e6ae 100644
--- a/plugins/actions/evalfilesmetrics/src/main/java/org/apache/hop/workflow/actions/evalfilesmetrics/ActionEvalFilesMetrics.java
+++ b/plugins/actions/evalfilesmetrics/src/main/java/org/apache/hop/workflow/actions/evalfilesmetrics/ActionEvalFilesMetrics.java
@@ -381,7 +381,7 @@ public Result execute(Result previousResult, int nr) throws HopException {
int indexOfResultFieldIncludeSubfolders = -1;
// as such we must get rows
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG,
@@ -456,7 +456,7 @@ public Result execute(Result previousResult, int nr) throws HopException {
break;
case SOURCE_FILES_FILENAMES_RESULT:
List resultFiles = result.getResultFilesList();
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG,
diff --git a/plugins/actions/evaluatetablecontent/src/main/java/org/apache/hop/workflow/actions/evaluatetablecontent/ActionEvalTableContent.java b/plugins/actions/evaluatetablecontent/src/main/java/org/apache/hop/workflow/actions/evaluatetablecontent/ActionEvalTableContent.java
index e27378e801d..45183d089b1 100644
--- a/plugins/actions/evaluatetablecontent/src/main/java/org/apache/hop/workflow/actions/evaluatetablecontent/ActionEvalTableContent.java
+++ b/plugins/actions/evaluatetablecontent/src/main/java/org/apache/hop/workflow/actions/evaluatetablecontent/ActionEvalTableContent.java
@@ -265,7 +265,7 @@ public Result execute(Result previousResult, int nr) {
boolean successOK = false;
int nrRowsLimit = Const.toInt(resolve(limit), 0);
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(PKG, "ActionEvalTableContent.Log.nrRowsLimit", "" + nrRowsLimit));
}
@@ -279,7 +279,7 @@ public Result execute(Result previousResult, int nr) {
if (useVars) {
realCustomSql = resolve(realCustomSql);
}
- if (log.isDebug()) {
+ if (isDebug()) {
logDebug(
BaseMessages.getString(
PKG, "ActionEvalTableContent.Log.EnteredCustomSQL", realCustomSql));
@@ -312,7 +312,7 @@ public Result execute(Result previousResult, int nr) {
}
if (countSqlStatement != null) {
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG, "ActionEvalTableContent.Log.RunSQLStatement", countSqlStatement));
@@ -340,7 +340,7 @@ public Result execute(Result previousResult, int nr) {
}
}
} else {
- if (log.isDebug()) {
+ if (isDebug()) {
logDebug(
BaseMessages.getString(
PKG,
@@ -355,7 +355,7 @@ public Result execute(Result previousResult, int nr) {
rowsCount = row.getInteger(0);
}
}
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG, "ActionEvalTableContent.Log.NrRowsReturned", "" + rowsCount));
diff --git a/plugins/actions/filesexist/src/main/java/org/apache/hop/workflow/actions/filesexist/ActionFilesExist.java b/plugins/actions/filesexist/src/main/java/org/apache/hop/workflow/actions/filesexist/ActionFilesExist.java
index 34430facf2f..222ac70c7eb 100644
--- a/plugins/actions/filesexist/src/main/java/org/apache/hop/workflow/actions/filesexist/ActionFilesExist.java
+++ b/plugins/actions/filesexist/src/main/java/org/apache/hop/workflow/actions/filesexist/ActionFilesExist.java
@@ -159,13 +159,13 @@ public Result execute(Result previousResult, int nr) {
if (file.exists()
&& file.isReadable()) { // TODO: is it needed to check file for readability?
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(PKG, "ActionFilesExist.File_Exists", realFilefoldername));
}
} else {
missingfiles++;
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG, "ActionFilesExist.File_Does_Not_Exist", realFilefoldername));
diff --git a/plugins/actions/folderisempty/src/main/java/org/apache/hop/workflow/actions/folderisempty/ActionFolderIsEmpty.java b/plugins/actions/folderisempty/src/main/java/org/apache/hop/workflow/actions/folderisempty/ActionFolderIsEmpty.java
index d680650274a..fc5f8997044 100644
--- a/plugins/actions/folderisempty/src/main/java/org/apache/hop/workflow/actions/folderisempty/ActionFolderIsEmpty.java
+++ b/plugins/actions/folderisempty/src/main/java/org/apache/hop/workflow/actions/folderisempty/ActionFolderIsEmpty.java
@@ -166,8 +166,8 @@ public Result execute(Result previousResult, int nr) {
throw ex;
}
}
- if (log.isBasic()) {
- log.logBasic("Total files", "We found : " + filescount + " file(s)");
+ if (isBasic()) {
+ logBasic("Total files", "We found : " + filescount + " file(s)");
}
if (filescount == 0) {
result.setResult(true);
@@ -175,12 +175,12 @@ public Result execute(Result previousResult, int nr) {
}
} else {
// Not a folder, fail
- log.logError("[" + realFoldername + "] is not a folder, failing.");
+ logError("[" + realFoldername + "] is not a folder, failing.");
result.setNrErrors(1);
}
} else {
// No Folder found
- if (log.isBasic()) {
+ if (isBasic()) {
logBasic("we can not find [" + realFoldername + "] !");
}
result.setNrErrors(1);
@@ -233,8 +233,8 @@ public boolean includeFile(FileSelectInfo info) throws ExpectedException {
// We are in the Base folder
if ((isSpecifyWildcard() && GetFileWildcard(info.getFile().getName().getBaseName()))
|| !isSpecifyWildcard()) {
- if (log.isDetailed()) {
- log.logDetailed("We found file : " + info.getFile().toString());
+ if (isDetailed()) {
+ logDetailed("We found file : " + info.getFile().toString());
}
filescount++;
}
@@ -244,8 +244,8 @@ public boolean includeFile(FileSelectInfo info) throws ExpectedException {
if (isIncludeSubFolders()) {
if ((isSpecifyWildcard() && GetFileWildcard(info.getFile().getName().getBaseName()))
|| !isSpecifyWildcard()) {
- if (log.isDetailed()) {
- log.logDetailed("We found file : " + info.getFile().toString());
+ if (isDetailed()) {
+ logDetailed("We found file : " + info.getFile().toString());
}
filescount++;
}
@@ -263,7 +263,7 @@ public boolean includeFile(FileSelectInfo info) throws ExpectedException {
} catch (Exception e) {
if (!rethrow) {
- log.logError(
+ logError(
BaseMessages.getString(PKG, "ActionFolderIsEmpty.Error"),
BaseMessages.getString(
PKG,
diff --git a/plugins/actions/folderscompare/src/main/java/org/apache/hop/workflow/actions/folderscompare/ActionFoldersCompare.java b/plugins/actions/folderscompare/src/main/java/org/apache/hop/workflow/actions/folderscompare/ActionFoldersCompare.java
index 4b9144a0b0b..af74d6a6b8e 100644
--- a/plugins/actions/folderscompare/src/main/java/org/apache/hop/workflow/actions/folderscompare/ActionFoldersCompare.java
+++ b/plugins/actions/folderscompare/src/main/java/org/apache/hop/workflow/actions/folderscompare/ActionFoldersCompare.java
@@ -298,7 +298,7 @@ public Result execute(Result previousResult, int nr) {
int lenList1 = list1.length;
int lenList2 = list2.length;
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG,
@@ -338,7 +338,7 @@ public Result execute(Result previousResult, int nr) {
Map.Entry entree = iterateur.next();
if (!collection2.containsKey(entree.getKey())) {
ok = false;
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG,
@@ -347,7 +347,7 @@ public Result execute(Result previousResult, int nr) {
realFilename2));
}
} else {
- if (log.isDebug()) {
+ if (isDebug()) {
logDebug(
BaseMessages.getString(
PKG,
@@ -363,7 +363,7 @@ public Result execute(Result previousResult, int nr) {
if (!filefolder2.getType().equals(filefolder1.getType())) {
// The file1 exist in the folder2..but they don't have the same type
ok = false;
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG,
@@ -405,7 +405,7 @@ public Result execute(Result previousResult, int nr) {
long filefolder2Size = filefolder2.getContent().getSize();
if (filefolder1Size != filefolder2Size) {
ok = false;
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG,
@@ -433,7 +433,7 @@ public Result execute(Result previousResult, int nr) {
if (comparefilecontent) {
if (!equalFileContents(filefolder1, filefolder2)) {
ok = false;
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG,
@@ -452,7 +452,7 @@ public Result execute(Result previousResult, int nr) {
result.setResult(ok);
} else {
// The 2 folders don't have the same files number
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG,
diff --git a/plugins/actions/ftp/src/main/java/org/apache/hop/workflow/actions/ftp/ActionFtp.java b/plugins/actions/ftp/src/main/java/org/apache/hop/workflow/actions/ftp/ActionFtp.java
index c91b5a9326f..1960ec637d5 100644
--- a/plugins/actions/ftp/src/main/java/org/apache/hop/workflow/actions/ftp/ActionFtp.java
+++ b/plugins/actions/ftp/src/main/java/org/apache/hop/workflow/actions/ftp/ActionFtp.java
@@ -323,7 +323,7 @@ protected InetAddress getInetAddress(String realServername) throws UnknownHostEx
@Override
public Result execute(Result previousResult, int nr) {
- log.logBasic(BaseMessages.getString(PKG, "ActionFTP.Started", serverName));
+ logBasic(BaseMessages.getString(PKG, "ActionFTP.Started", serverName));
Result result = previousResult;
result.setNrErrors(1);
@@ -350,7 +350,7 @@ public Result execute(Result previousResult, int nr) {
String realMoveToFolder = null;
try {
- ftpClient = FtpClientUtil.connectAndLogin(log, this, this, getName());
+ ftpClient = FtpClientUtil.connectAndLogin(getLogChannel(), this, this, getName());
// move to spool dir ...
if (!Utils.isEmpty(remoteDirectory)) {
@@ -752,7 +752,7 @@ protected boolean needsDownload(String filename) {
return true;
} else if (ifFileExists == ifFileExistsFail) {
- log.logError(BaseMessages.getString(PKG, CONST_LOCAL_FILE_EXISTS), filename);
+ logError(BaseMessages.getString(PKG, CONST_LOCAL_FILE_EXISTS), filename);
updateErrors();
} else {
if (isDebug()) {
diff --git a/plugins/actions/ftp/src/main/java/org/apache/hop/workflow/actions/ftpdelete/ActionFtpDelete.java b/plugins/actions/ftp/src/main/java/org/apache/hop/workflow/actions/ftpdelete/ActionFtpDelete.java
index 99a7d912657..f35285364a5 100644
--- a/plugins/actions/ftp/src/main/java/org/apache/hop/workflow/actions/ftpdelete/ActionFtpDelete.java
+++ b/plugins/actions/ftp/src/main/java/org/apache/hop/workflow/actions/ftpdelete/ActionFtpDelete.java
@@ -501,7 +501,7 @@ public void setProxyUsername(String proxyUsername) {
/** Needed for the Vector coming from sshclient.ls() * */
@Override
public Result execute(Result previousResult, int nr) {
- log.logBasic(BaseMessages.getString(PKG, "ActionFTPDelete.Started", serverName));
+ logBasic(BaseMessages.getString(PKG, "ActionFTPDelete.Started", serverName));
RowMetaAndData resultRow = null;
Result result = previousResult;
List rows = result.getRows();
@@ -727,7 +727,7 @@ private void sftpConnect(
private void ftpConnect(String realFtpDirectory) throws Exception {
// Create ftp client to host:port ...
- ftpclient = FtpClientUtil.connectAndLogin(log, this, this, getName());
+ ftpclient = FtpClientUtil.connectAndLogin(getLogChannel(), this, this, getName());
// move to spool dir ...
if (!Utils.isEmpty(realFtpDirectory)) {
diff --git a/plugins/actions/ftp/src/main/java/org/apache/hop/workflow/actions/ftpput/ActionFtpPut.java b/plugins/actions/ftp/src/main/java/org/apache/hop/workflow/actions/ftpput/ActionFtpPut.java
index bea94301135..11dd1269d0d 100644
--- a/plugins/actions/ftp/src/main/java/org/apache/hop/workflow/actions/ftpput/ActionFtpPut.java
+++ b/plugins/actions/ftp/src/main/java/org/apache/hop/workflow/actions/ftpput/ActionFtpPut.java
@@ -527,7 +527,7 @@ public Result execute(Result previousResult, int nr) {
result.setResult(false);
long filesPut = 0;
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(BaseMessages.getString(PKG, "ActionFtpPut.Log.Starting"));
}
@@ -540,7 +540,7 @@ public Result execute(Result previousResult, int nr) {
String realRemoteDirectory = resolve(remoteDirectory);
if (!Utils.isEmpty(realRemoteDirectory)) {
ftpclient.changeWorkingDirectory(realRemoteDirectory);
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG, "ActionFtpPut.Log.ChangedDirectory", realRemoteDirectory));
@@ -571,7 +571,7 @@ public Result execute(Result previousResult, int nr) {
}
}
}
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG,
@@ -611,7 +611,7 @@ public Result execute(Result previousResult, int nr) {
// Assume file does not exist !!
}
- if (log.isDebug()) {
+ if (isDebug()) {
if (fileExist) {
logDebug(BaseMessages.getString(PKG, "ActionFtpPut.Log.FileExists", file));
} else {
@@ -620,7 +620,7 @@ public Result execute(Result previousResult, int nr) {
}
if (!fileExist || !onlyPuttingNewFiles) {
- if (log.isDebug()) {
+ if (isDebug()) {
logDebug(
BaseMessages.getString(
PKG,
@@ -634,7 +634,7 @@ public Result execute(Result previousResult, int nr) {
if (fileExist) {
boolean deleted = ftpclient.deleteFile(file);
if (!deleted) {
- log.logError(
+ logError(
"Deletion of (existing) file '"
+ file
+ "' on the FTP server was not successful with reply string: "
@@ -648,7 +648,7 @@ public Result execute(Result previousResult, int nr) {
if (success) {
filesPut++;
} else {
- log.logError(
+ logError(
"Transfer of file '"
+ localFilename
+ "' to the FTP server was not successful with reply string: "
@@ -659,7 +659,7 @@ public Result execute(Result previousResult, int nr) {
// Delete the file if this is needed!
if (remove) {
new File(localFilename).delete();
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(PKG, "ActionFtpPut.Log.DeletedFile", localFilename));
}
@@ -669,7 +669,7 @@ public Result execute(Result previousResult, int nr) {
}
result.setResult(true);
- if (log.isBasic()) {
+ if (isBasic()) {
logBasic(BaseMessages.getString(PKG, "ActionFtpPut.Log.WeHavePut", "" + filesPut));
}
} catch (Exception e) {
@@ -693,7 +693,7 @@ public Result execute(Result previousResult, int nr) {
// package-local visibility for testing purposes
FTPClient createAndSetUpFtpClient() throws HopException {
- return FtpClientUtil.connectAndLogin(log, this, this, getName());
+ return FtpClientUtil.connectAndLogin(getLogChannel(), this, this, getName());
}
@Override
diff --git a/plugins/actions/ftp/src/main/java/org/apache/hop/workflow/actions/sftp/ActionSftp.java b/plugins/actions/ftp/src/main/java/org/apache/hop/workflow/actions/sftp/ActionSftp.java
index f1c7bf9c141..4a96c3fec04 100644
--- a/plugins/actions/ftp/src/main/java/org/apache/hop/workflow/actions/sftp/ActionSftp.java
+++ b/plugins/actions/ftp/src/main/java/org/apache/hop/workflow/actions/sftp/ActionSftp.java
@@ -427,14 +427,14 @@ public Result execute(Result previousResult, int nr) {
result.setResult(false);
long filesRetrieved = 0;
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(BaseMessages.getString(PKG, "ActionSftp.Log.StartAction"));
}
HashSet listPreviousFilenames = new HashSet<>();
if (copyprevious) {
if (rows.isEmpty()) {
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(BaseMessages.getString(PKG, "ActionSftp.ArgsFromPreviousNothing"));
}
result.setResult(true);
@@ -450,7 +450,7 @@ public Result execute(Result previousResult, int nr) {
String filePrevious = resultRow.getString(0, null);
if (!Utils.isEmpty(filePrevious)) {
listPreviousFilenames.add(filePrevious);
- if (log.isDebug()) {
+ if (isDebug()) {
logDebug(
BaseMessages.getString(PKG, "ActionSftp.Log.FilenameFromResult", filePrevious));
}
@@ -502,7 +502,7 @@ public Result execute(Result previousResult, int nr) {
targetFolder = HopVfs.getFileObject(realTargetDirectory);
boolean targetFolderExists = targetFolder.exists();
if (targetFolderExists) {
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG, "ActionSftp.Log.TargetFolderExists", realTargetDirectory));
@@ -518,7 +518,7 @@ public Result execute(Result previousResult, int nr) {
} else {
// create target folder
targetFolder.createFolder();
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG, "ActionSftp.Log.TargetFolderCreated", realTargetDirectory));
@@ -540,7 +540,7 @@ public Result execute(Result previousResult, int nr) {
realUsername,
realKeyFilename,
realPassPhrase);
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG,
@@ -582,7 +582,7 @@ public Result execute(Result previousResult, int nr) {
PKG, "ActionSftp.Error.CanNotFindRemoteFolder", realSftpDirString));
throw new Exception(e);
}
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(PKG, "ActionSftp.Log.ChangedDirectory", realSftpDirString));
}
@@ -593,12 +593,12 @@ public Result execute(Result previousResult, int nr) {
if (filelist == null) {
// Nothing was found !!! exit
result.setResult(true);
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(BaseMessages.getString(PKG, "ActionSftp.Log.Found", "" + 0));
}
return result;
}
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(BaseMessages.getString(PKG, "ActionSftp.Log.Found", "" + filelist.length));
}
@@ -626,7 +626,7 @@ public Result execute(Result previousResult, int nr) {
}
if (getIt) {
- if (log.isDebug()) {
+ if (isDebug()) {
logDebug(
BaseMessages.getString(
PKG, "ActionSftp.Log.GettingFiles", filelist[i], realTargetDirectory));
@@ -646,20 +646,20 @@ public Result execute(Result previousResult, int nr) {
parentWorkflow.getWorkflowName(),
toString());
result.getResultFiles().put(resultFile.getFile().toString(), resultFile);
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG, "ActionSftp.Log.FilenameAddedToResultFilenames", filelist[i]));
}
}
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(BaseMessages.getString(PKG, "ActionSftp.Log.TransferedFile", filelist[i]));
}
// Delete the file if this is needed!
if (remove) {
sftpclient.delete(filelist[i]);
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(BaseMessages.getString(PKG, "ActionSftp.Log.DeletedFile", filelist[i]));
}
}
diff --git a/plugins/actions/ftp/src/main/java/org/apache/hop/workflow/actions/sftpput/ActionSftpPut.java b/plugins/actions/ftp/src/main/java/org/apache/hop/workflow/actions/sftpput/ActionSftpPut.java
index de770706e75..e53a124f50f 100644
--- a/plugins/actions/ftp/src/main/java/org/apache/hop/workflow/actions/sftpput/ActionSftpPut.java
+++ b/plugins/actions/ftp/src/main/java/org/apache/hop/workflow/actions/sftpput/ActionSftpPut.java
@@ -561,14 +561,14 @@ public Result execute(Result previousResult, int nr) throws HopException {
List rows = result.getRows();
result.setResult(false);
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(BaseMessages.getString(PKG, "ActionSftpPut.Log.StartAction"));
}
ArrayList myFileList = new ArrayList<>();
if (copyingPrevious) {
if (rows.isEmpty()) {
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(BaseMessages.getString(PKG, "ActionSftpPut.ArgsFromPreviousNothing"));
}
result.setResult(true);
@@ -591,7 +591,7 @@ public Result execute(Result previousResult, int nr) throws HopException {
PKG, "ActionSftpPut.Log.FilefromPreviousNotFound", filePrevious));
} else {
myFileList.add(file);
- if (log.isDebug()) {
+ if (isDebug()) {
logDebug(
BaseMessages.getString(
PKG, "ActionSftpPut.Log.FilenameFromResult", filePrevious));
@@ -611,7 +611,7 @@ public Result execute(Result previousResult, int nr) throws HopException {
if (copyingPreviousFiles) {
List resultFiles = result.getResultFilesList();
if (resultFiles == null || resultFiles.isEmpty()) {
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(BaseMessages.getString(PKG, "ActionSftpPut.ArgsFromPreviousNothingFiles"));
}
result.setResult(true);
@@ -630,7 +630,7 @@ public Result execute(Result previousResult, int nr) throws HopException {
PKG, "ActionSftpPut.Log.FilefromPreviousNotFound", file.toString()));
} else {
myFileList.add(file);
- if (log.isDebug()) {
+ if (isDebug()) {
logDebug(
BaseMessages.getString(
PKG, "ActionSftpPut.Log.FilenameFromResult", file.toString()));
@@ -728,7 +728,7 @@ public Result execute(Result previousResult, int nr) throws HopException {
realUsername,
realKeyFilename,
realPassPhrase);
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG,
@@ -768,7 +768,7 @@ public Result execute(Result previousResult, int nr) throws HopException {
BaseMessages.getString(
PKG, "ActionSftpPut.Error.CanNotFindRemoteFolder", realSftpDirString));
}
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG, "ActionSftpPut.Error.CanNotFindRemoteFolder", realSftpDirString));
@@ -776,14 +776,14 @@ public Result execute(Result previousResult, int nr) throws HopException {
// Let's create folder
sftpclient.createFolder(realSftpDirString);
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG, "ActionSftpPut.Log.RemoteFolderCreated", realSftpDirString));
}
}
sftpclient.chdir(realSftpDirString);
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(PKG, "ActionSftpPut.Log.ChangedDirectory", realSftpDirString));
}
@@ -805,7 +805,7 @@ public Result execute(Result previousResult, int nr) throws HopException {
}
}
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG, "ActionSftpPut.Log.RowsFromPreviousResult", myFileList.size()));
@@ -839,7 +839,7 @@ public Result execute(Result previousResult, int nr) throws HopException {
if (getIt) {
nrFilesMatched++;
- if (log.isDebug()) {
+ if (isDebug()) {
logDebug(
BaseMessages.getString(
PKG, "ActionSftpPut.Log.PuttingFile", localFilename, realSftpDirString));
@@ -848,7 +848,7 @@ public Result execute(Result previousResult, int nr) throws HopException {
sftpclient.put(myFile, destinationFilename);
nrFilesSent++;
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(PKG, "ActionSftpPut.Log.TransferredFile", localFilename));
}
@@ -858,7 +858,7 @@ public Result execute(Result previousResult, int nr) throws HopException {
switch (getAfterFtps()) {
case AFTER_FTPSPUT_DELETE:
myFile.delete();
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(PKG, "ActionSftpPut.Log.DeletedFile", localFilename));
}
@@ -872,7 +872,7 @@ public Result execute(Result previousResult, int nr) throws HopException {
+ Const.FILE_SEPARATOR
+ myFile.getName().getBaseName());
myFile.moveTo(destination);
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG, "ActionSftpPut.Log.FileMoved", myFile, destination));
@@ -893,7 +893,7 @@ public Result execute(Result previousResult, int nr) throws HopException {
parentWorkflow.getWorkflowName(),
toString());
result.getResultFiles().put(resultFile.getFile().toString(), resultFile);
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG,
diff --git a/plugins/actions/getpop/src/main/java/org/apache/hop/workflow/actions/getpop/ActionGetPOP.java b/plugins/actions/getpop/src/main/java/org/apache/hop/workflow/actions/getpop/ActionGetPOP.java
index 7b57ec39017..0ccc49cefac 100644
--- a/plugins/actions/getpop/src/main/java/org/apache/hop/workflow/actions/getpop/ActionGetPOP.java
+++ b/plugins/actions/getpop/src/main/java/org/apache/hop/workflow/actions/getpop/ActionGetPOP.java
@@ -854,7 +854,7 @@ && getAfterGetIMAP() == MailConnectionMeta.AFTER_GET_IMAP_MOVE)) {
// create a mail connection object
mailConn =
new MailConnection(
- log,
+ getLogChannel(),
MailConnectionMeta.getProtocolFromString(
getProtocol(), MailConnectionMeta.PROTOCOL_IMAP),
realserver,
diff --git a/plugins/actions/http/src/main/java/org/apache/hop/workflow/actions/http/ActionHttp.java b/plugins/actions/http/src/main/java/org/apache/hop/workflow/actions/http/ActionHttp.java
index 6d48ba334c7..e8e268ddb74 100644
--- a/plugins/actions/http/src/main/java/org/apache/hop/workflow/actions/http/ActionHttp.java
+++ b/plugins/actions/http/src/main/java/org/apache/hop/workflow/actions/http/ActionHttp.java
@@ -450,19 +450,20 @@ protected PasswordAuthentication getPasswordAuthentication() {
HttpsURLConnection httpsConn = (HttpsURLConnection) connection;
httpsConn.setSSLSocketFactory(
HttpClientManager.getTrustAllSslContext().getSocketFactory());
- httpsConn.setHostnameVerifier(HttpClientManager.getHostnameVerifier(isDebug(), log));
+ httpsConn.setHostnameVerifier(
+ HttpClientManager.getHostnameVerifier(isDebug(), getLogChannel()));
}
// if we have HTTP headers, add them
if (!Utils.isEmpty(headerName)) {
- if (log.isDebug()) {
- log.logDebug(BaseMessages.getString(PKG, "ActionHTTP.Log.HeadersProvided"));
+ if (isDebug()) {
+ logDebug(BaseMessages.getString(PKG, "ActionHTTP.Log.HeadersProvided"));
}
for (int j = 0; j < headerName.length; j++) {
if (!Utils.isEmpty(headerValue[j])) {
connection.setRequestProperty(resolve(headerName[j]), resolve(headerValue[j]));
- if (log.isDebug()) {
- log.logDebug(
+ if (isDebug()) {
+ logDebug(
BaseMessages.getString(
PKG,
"ActionHTTP.Log.HeaderSet",
@@ -477,7 +478,7 @@ protected PasswordAuthentication getPasswordAuthentication() {
// See if we need to send a file over?
if (!Utils.isEmpty(realUploadFile)) {
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(BaseMessages.getString(PKG, "ActionHTTP.Log.SendingFile", realUploadFile));
}
@@ -500,12 +501,12 @@ protected PasswordAuthentication getPasswordAuthentication() {
fileStream = null;
}
}
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(BaseMessages.getString(PKG, "ActionHTTP.Log.FinishedSendingFile"));
}
}
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(BaseMessages.getString(PKG, "ActionHTTP.Log.StartReadingReply"));
}
diff --git a/plugins/actions/mail/src/main/java/org/apache/hop/workflow/actions/mail/ActionMail.java b/plugins/actions/mail/src/main/java/org/apache/hop/workflow/actions/mail/ActionMail.java
index a72534afda5..139e64705ed 100644
--- a/plugins/actions/mail/src/main/java/org/apache/hop/workflow/actions/mail/ActionMail.java
+++ b/plugins/actions/mail/src/main/java/org/apache/hop/workflow/actions/mail/ActionMail.java
@@ -684,7 +684,7 @@ public Result execute(Result result, int nr) {
props.put(CONST_MAIL + protocol + ".port", resolve(port));
}
- if (log.isDebug()) {
+ if (isDebug()) {
props.put("mail.debug", "true");
}
@@ -693,7 +693,7 @@ public Result execute(Result result, int nr) {
}
Session session = Session.getInstance(props);
- session.setDebug(log.isDebug());
+ session.setDebug(isDebug());
try {
// create a message
@@ -1041,8 +1041,8 @@ public Result execute(Result result, int nr) {
String realImageFile = resolve(embeddedimages[i]);
String realcontenID = resolve(contentids[i]);
if (messageText.indexOf("cid:" + realcontenID) < 0) {
- if (log.isDebug()) {
- log.logDebug("Image [" + realImageFile + "] is not used in message body!");
+ if (isDebug()) {
+ logDebug("Image [" + realImageFile + "] is not used in message body!");
}
} else {
try {
@@ -1051,7 +1051,7 @@ public Result execute(Result result, int nr) {
if (imageFile.exists() && imageFile.getType() == FileType.FILE) {
found = true;
} else {
- log.logError("We can not find [" + realImageFile + "] or it is not a file");
+ logError("We can not find [" + realImageFile + "] or it is not a file");
}
if (found) {
// Create part for the image
@@ -1064,12 +1064,12 @@ public Result execute(Result result, int nr) {
// Add part to multi-part
parts.addBodyPart(messageBodyPart);
nrEmbeddedImages++;
- log.logBasic("Image '" + fds.getName() + "' was embedded in message.");
+ logBasic("Image '" + fds.getName() + "' was embedded in message.");
}
} catch (Exception e) {
- log.logError(
+ logError(
"Error embedding image [" + realImageFile + "] in message : " + e.toString());
- log.logError(Const.getStackTracker(e));
+ logError(Const.getStackTracker(e));
result.setNrErrors(1);
} finally {
if (imageFile != null) {
diff --git a/plugins/actions/mailvalidator/src/main/java/org/apache/hop/workflow/actions/mailvalidator/ActionMailValidator.java b/plugins/actions/mailvalidator/src/main/java/org/apache/hop/workflow/actions/mailvalidator/ActionMailValidator.java
index 0a76857f288..14134ac5fd6 100644
--- a/plugins/actions/mailvalidator/src/main/java/org/apache/hop/workflow/actions/mailvalidator/ActionMailValidator.java
+++ b/plugins/actions/mailvalidator/src/main/java/org/apache/hop/workflow/actions/mailvalidator/ActionMailValidator.java
@@ -155,19 +155,19 @@ public Result execute(Result previousResult, int nr) {
String mailError = null;
for (int i = 0; i < mailsCheck.length && !exitloop; i++) {
String email = mailsCheck[i];
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(BaseMessages.getString(PKG, "ActionMailValidator.CheckingMail", email));
}
// Check if address is valid
MailValidationResult resultValidator =
MailValidation.isAddressValid(
- log, email, realSender, realDefaultSMTP, timeOut, smtpCheck);
+ getLogChannel(), email, realSender, realDefaultSMTP, timeOut, smtpCheck);
mailIsValid = resultValidator.isValide();
mailError = resultValidator.getErrorMessage();
- if (log.isDetailed()) {
+ if (isDetailed()) {
if (mailIsValid) {
logDetailed(BaseMessages.getString(PKG, "ActionMailValidator.MailValid", email));
} else {
diff --git a/plugins/actions/movefiles/src/main/java/org/apache/hop/workflow/actions/movefiles/ActionMoveFiles.java b/plugins/actions/movefiles/src/main/java/org/apache/hop/workflow/actions/movefiles/ActionMoveFiles.java
index 427f9597aef..25a73b434a0 100644
--- a/plugins/actions/movefiles/src/main/java/org/apache/hop/workflow/actions/movefiles/ActionMoveFiles.java
+++ b/plugins/actions/movefiles/src/main/java/org/apache/hop/workflow/actions/movefiles/ActionMoveFiles.java
@@ -323,7 +323,7 @@ public Result execute(Result previousResult, int nr) throws HopException {
successConditionBrokenExit = false;
limitFiles = Const.toInt(resolve(getNrErrorsLessThan()), 10);
- if (log.isDetailed()) {
+ if (isDetailed()) {
if (simulate) {
logDetailed(BaseMessages.getString(PKG, "ActionMoveFiles.Log.SimulationOn"));
}
@@ -347,7 +347,7 @@ public Result execute(Result previousResult, int nr) throws HopException {
try {
folder = HopVfs.getFileObject(moveToFolder, getVariables());
if (!folder.exists()) {
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG, "ActionMoveFiles.Log.Error.FolderMissing", moveToFolder));
@@ -386,7 +386,7 @@ public Result execute(Result previousResult, int nr) throws HopException {
}
if (argFromPrevious) {
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG,
@@ -418,7 +418,7 @@ public Result execute(Result previousResult, int nr) throws HopException {
if (!Utils.isEmpty(vSourceFileFolderPrevious)
&& !Utils.isEmpty(vDestinationFileFolderPrevious)) {
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG,
@@ -440,7 +440,7 @@ public Result execute(Result previousResult, int nr) throws HopException {
updateErrors();
}
} else {
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG,
@@ -468,7 +468,7 @@ public Result execute(Result previousResult, int nr) throws HopException {
if (!Utils.isEmpty(vSourceFileFolder[i]) && !Utils.isEmpty(vDestinationFileFolder[i])) {
// ok we can process this file/folder
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG,
@@ -489,7 +489,7 @@ public Result execute(Result previousResult, int nr) throws HopException {
updateErrors();
}
} else {
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG,
@@ -515,7 +515,7 @@ public Result execute(Result previousResult, int nr) throws HopException {
}
private void displayResults() {
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed("=======================================");
logDetailed(
BaseMessages.getString(PKG, "ActionMoveFiles.Log.Info.FilesInError", "" + nrErrors));
@@ -575,7 +575,7 @@ private boolean processFileFolder(
// Source is a folder, destination is a file
// WARNING !!! CAN NOT MOVE FOLDER TO FILE !!!
- log.logError(
+ logError(
BaseMessages.getString(PKG, "ActionMoveFiles.Log.Forbidden"),
BaseMessages.getString(
PKG,
@@ -670,7 +670,7 @@ private boolean processFileFolder(
return entrystatus;
} else {
// Both source and destination are folders
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(" ");
logDetailed(
BaseMessages.getString(
@@ -821,7 +821,7 @@ private boolean moveFile(
sourcefilename.moveTo(destinationfilename);
}
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG,
@@ -841,7 +841,7 @@ private boolean moveFile(
retval = true;
} else {
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG, "ActionMoveFiles.Log.FileExists", destinationfilename.toString()));
@@ -850,7 +850,7 @@ private boolean moveFile(
if (!simulate) {
sourcefilename.moveTo(destinationfilename);
}
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG,
@@ -891,7 +891,7 @@ private boolean moveFile(
if (!simulate) {
sourcefilename.moveTo(destinationfile);
}
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG,
@@ -913,7 +913,7 @@ private boolean moveFile(
if (!simulate) {
sourcefilename.delete();
}
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG,
@@ -944,7 +944,7 @@ private boolean moveFile(
if (!simulate) {
sourcefilename.moveTo(destinationfile);
}
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG,
@@ -965,7 +965,7 @@ private boolean moveFile(
if (!simulate) {
sourcefilename.moveTo(destinationfile);
}
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG,
@@ -996,7 +996,7 @@ private boolean moveFile(
if (!simulate) {
sourcefilename.moveTo(destinationfile);
}
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG,
@@ -1205,7 +1205,7 @@ private void addFileToResultFilenames(
toString());
result.getResultFiles().put(resultFile.getFile().toString(), resultFile);
- if (log.isDebug()) {
+ if (isDebug()) {
logDebug(" ------ ");
logDebug(
BaseMessages.getString(
@@ -1213,7 +1213,7 @@ private void addFileToResultFilenames(
}
} catch (Exception e) {
- log.logError(
+ logError(
BaseMessages.getString(PKG, "ActionMoveFiles.Error.AddingToFilenameResult"),
fileaddentry + "" + e.getMessage());
}
@@ -1230,13 +1230,13 @@ private boolean createDestinationFolder(FileObject filefolder) {
if (!folder.exists()) {
if (createDestinationFolder) {
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG, "ActionMoveFiles.Log.FolderNotExist", folder.getName().toString()));
}
folder.createFolder();
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG, "ActionMoveFiles.Log.FolderWasCreated", folder.getName().toString()));
diff --git a/plugins/actions/mssqlbulkload/src/main/java/org/apache/hop/workflow/actions/mssqlbulkload/ActionMssqlBulkLoad.java b/plugins/actions/mssqlbulkload/src/main/java/org/apache/hop/workflow/actions/mssqlbulkload/ActionMssqlBulkLoad.java
index f59c043529b..bdbebcb50ca 100644
--- a/plugins/actions/mssqlbulkload/src/main/java/org/apache/hop/workflow/actions/mssqlbulkload/ActionMssqlBulkLoad.java
+++ b/plugins/actions/mssqlbulkload/src/main/java/org/apache/hop/workflow/actions/mssqlbulkload/ActionMssqlBulkLoad.java
@@ -326,7 +326,7 @@ public Result execute(Result previousResult, int nr) {
File file = new File(realFilename);
if (file.exists() && file.canRead()) {
// User has specified an existing file, We can continue ...
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(PKG, "ActionMssqlBulkLoad.FileExists.Label", realFilename));
}
@@ -351,7 +351,7 @@ public Result execute(Result previousResult, int nr) {
if (db.checkTableExists(realSchemaname, realTablename)) {
// The table existe, We can continue ...
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG, "ActionMssqlBulkLoad.TableExists.Label", realTablename));
diff --git a/plugins/actions/mysqlbulkfile/src/main/java/org/apache/hop/workflow/actions/mysqlbulkfile/ActionMysqlBulkFile.java b/plugins/actions/mysqlbulkfile/src/main/java/org/apache/hop/workflow/actions/mysqlbulkfile/ActionMysqlBulkFile.java
index 5173c5331fc..b2882287175 100644
--- a/plugins/actions/mysqlbulkfile/src/main/java/org/apache/hop/workflow/actions/mysqlbulkfile/ActionMysqlBulkFile.java
+++ b/plugins/actions/mysqlbulkfile/src/main/java/org/apache/hop/workflow/actions/mysqlbulkfile/ActionMysqlBulkFile.java
@@ -229,7 +229,7 @@ public Result execute(Result previousResult, int nr) {
} else if (file.exists() && ifFileExists == 1) {
// the file exists and user want to do nothing
result.setResult(true);
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(PKG, CONST_ACTION_MYSQL_BULK_FILE_FILE_EXISTS_1_LABEL)
+ realFilename
@@ -265,7 +265,7 @@ public Result execute(Result previousResult, int nr) {
}
// User has specified an existing file, We can continue ...
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(PKG, CONST_ACTION_MYSQL_BULK_FILE_FILE_EXISTS_1_LABEL)
+ realFilename
@@ -283,7 +283,7 @@ public Result execute(Result previousResult, int nr) {
if (db.checkTableExists(realSchemaname, realTablename)) {
// The table existe, We can continue ...
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(PKG, "ActionMysqlBulkFile.TableExists1.Label")
+ realTablename
@@ -364,7 +364,7 @@ public Result execute(Result previousResult, int nr) {
+ " LOCK IN SHARE MODE";
try {
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(fileBulkFile);
}
// Run the SQL
@@ -401,7 +401,7 @@ public Result execute(Result previousResult, int nr) {
// Of course, the table should have been created already before the bulk load
// operation
result.setNrErrors(1);
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(PKG, "ActionMysqlBulkFile.TableNotExists1.Label")
+ realTablename
diff --git a/plugins/actions/mysqlbulkload/src/main/java/org/apache/hop/workflow/actions/mysqlbulkload/ActionMysqlBulkLoad.java b/plugins/actions/mysqlbulkload/src/main/java/org/apache/hop/workflow/actions/mysqlbulkload/ActionMysqlBulkLoad.java
index 243ba9044a8..54e518e92a3 100644
--- a/plugins/actions/mysqlbulkload/src/main/java/org/apache/hop/workflow/actions/mysqlbulkload/ActionMysqlBulkLoad.java
+++ b/plugins/actions/mysqlbulkload/src/main/java/org/apache/hop/workflow/actions/mysqlbulkload/ActionMysqlBulkLoad.java
@@ -247,7 +247,7 @@ public Result execute(Result previousResult, int nr) {
File file = new File(realFilename);
if ((file.exists() && file.canRead()) || isLocalInfile() == false) {
// User has specified an existing file, We can continue ...
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed("File [" + realFilename + "] exists.");
}
@@ -262,7 +262,7 @@ public Result execute(Result previousResult, int nr) {
if (db.checkTableExists(realSchemaname, realTablename)) {
// The table existe, We can continue ...
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed("Table [" + realTablename + "] exists.");
}
@@ -403,7 +403,7 @@ public Result execute(Result previousResult, int nr) {
// Of course, the table should have been created already before the bulk load
// operation
result.setNrErrors(1);
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed("Table [" + realTablename + "] doesn't exist!");
}
}
diff --git a/plugins/actions/pgpfiles/src/main/java/org/apache/hop/workflow/actions/pgpdecryptfiles/ActionPGPDecryptFiles.java b/plugins/actions/pgpfiles/src/main/java/org/apache/hop/workflow/actions/pgpdecryptfiles/ActionPGPDecryptFiles.java
index 52abb1207d3..1974eb70d38 100644
--- a/plugins/actions/pgpfiles/src/main/java/org/apache/hop/workflow/actions/pgpdecryptfiles/ActionPGPDecryptFiles.java
+++ b/plugins/actions/pgpfiles/src/main/java/org/apache/hop/workflow/actions/pgpdecryptfiles/ActionPGPDecryptFiles.java
@@ -393,7 +393,7 @@ public Result execute(Result previousResult, int nr) throws HopException {
}
}
- gpg = new GPG(resolve(gpgLocation), log, getVariables());
+ gpg = new GPG(resolve(gpgLocation), getLogChannel(), getVariables());
if (argFromPrevious && isDetailed()) {
logDetailed(
diff --git a/plugins/actions/pgpfiles/src/main/java/org/apache/hop/workflow/actions/pgpencryptfiles/ActionPGPEncryptFiles.java b/plugins/actions/pgpfiles/src/main/java/org/apache/hop/workflow/actions/pgpencryptfiles/ActionPGPEncryptFiles.java
index e7b68d99d32..c9af524ebdf 100644
--- a/plugins/actions/pgpfiles/src/main/java/org/apache/hop/workflow/actions/pgpencryptfiles/ActionPGPEncryptFiles.java
+++ b/plugins/actions/pgpfiles/src/main/java/org/apache/hop/workflow/actions/pgpencryptfiles/ActionPGPEncryptFiles.java
@@ -432,7 +432,7 @@ public Result execute(Result previousResult, int nr) {
}
}
- gpg = new GPG(resolve(gpgLocation), log, getVariables());
+ gpg = new GPG(resolve(gpgLocation), getLogChannel(), getVariables());
if (argFromPrevious && isDetailed()) {
logDetailed(
diff --git a/plugins/actions/pgpfiles/src/main/java/org/apache/hop/workflow/actions/pgpverify/ActionPGPVerify.java b/plugins/actions/pgpfiles/src/main/java/org/apache/hop/workflow/actions/pgpverify/ActionPGPVerify.java
index 60c4a992b26..23094452164 100644
--- a/plugins/actions/pgpfiles/src/main/java/org/apache/hop/workflow/actions/pgpverify/ActionPGPVerify.java
+++ b/plugins/actions/pgpfiles/src/main/java/org/apache/hop/workflow/actions/pgpverify/ActionPGPVerify.java
@@ -166,7 +166,7 @@ public Result execute(Result previousResult, int nr) {
}
file = HopVfs.getFileObject(realFilename, getVariables());
- GPG gpg = new GPG(resolve(getGPGLocation()), log, getVariables());
+ GPG gpg = new GPG(resolve(getGPGLocation()), getLogChannel(), getVariables());
if (useDetachedfilename()) {
String signature = resolve(getDetachedfilename());
diff --git a/plugins/actions/ping/src/main/java/org/apache/hop/workflow/actions/ping/ActionPing.java b/plugins/actions/ping/src/main/java/org/apache/hop/workflow/actions/ping/ActionPing.java
index 5b3b3f2e44e..0a8b9ca6110 100644
--- a/plugins/actions/ping/src/main/java/org/apache/hop/workflow/actions/ping/ActionPing.java
+++ b/plugins/actions/ping/src/main/java/org/apache/hop/workflow/actions/ping/ActionPing.java
@@ -205,13 +205,13 @@ public Result execute(Result previousResult, int nr) {
// Perform a system (Java) ping ...
status = systemPing(hostname, timeoutInt);
if (status) {
- if (log.isDetailed()) {
- log.logDetailed(
+ if (isDetailed()) {
+ logDetailed(
BaseMessages.getString(PKG, "ActionPing.SystemPing"),
BaseMessages.getString(PKG, CONST_ACTION_PING_OK_LABEL, hostname));
}
} else {
- log.logError(
+ logError(
BaseMessages.getString(PKG, "ActionPing.SystemPing"),
BaseMessages.getString(PKG, CONST_ACTION_PING_NOK_LABEL, hostname));
}
@@ -220,13 +220,13 @@ public Result execute(Result previousResult, int nr) {
// Perform a classic ping ..
status = classicPing(hostname, packets);
if (status) {
- if (log.isDetailed()) {
- log.logDetailed(
+ if (isDetailed()) {
+ logDetailed(
BaseMessages.getString(PKG, "ActionPing.ClassicPing"),
BaseMessages.getString(PKG, CONST_ACTION_PING_OK_LABEL, hostname));
}
} else {
- log.logError(
+ logError(
BaseMessages.getString(PKG, "ActionPing.ClassicPing"),
BaseMessages.getString(PKG, CONST_ACTION_PING_NOK_LABEL, hostname));
}
@@ -235,7 +235,7 @@ public Result execute(Result previousResult, int nr) {
logError(BaseMessages.getString(PKG, "ActionPing.Error.Label") + ex.getMessage());
}
if (status) {
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(BaseMessages.getString(PKG, CONST_ACTION_PING_OK_LABEL, hostname));
}
result.setNrErrors(0);
@@ -262,7 +262,7 @@ private boolean systemPing(String hostname, int timeout) {
return retval;
}
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(BaseMessages.getString(PKG, "ActionPing.HostName", address.getHostName()));
logDetailed(
BaseMessages.getString(PKG, "ActionPing.HostAddress", address.getHostAddress()));
@@ -286,7 +286,7 @@ private boolean classicPing(String hostname, int nrpackets) {
cmdPing += hostname + " " + NIX_CHAR + " " + nrpackets;
}
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(BaseMessages.getString(PKG, "ActionPing.NbrPackets.Label", "" + nrpackets));
logDetailed(BaseMessages.getString(PKG, "ActionPing.ExecClassicPing.Label", cmdPing));
}
@@ -296,7 +296,7 @@ private boolean classicPing(String hostname, int nrpackets) {
} catch (InterruptedException e) {
logDetailed(BaseMessages.getString(PKG, "ActionPing.ClassicPingInterrupted"));
}
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(BaseMessages.getString(PKG, "ActionPing.Gettingresponse.Label", hostname));
}
// Get ping response
@@ -304,7 +304,7 @@ private boolean classicPing(String hostname, int nrpackets) {
// Read response lines
while ((lignePing = br.readLine()) != null) {
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(lignePing);
}
}
diff --git a/plugins/actions/pipeline/src/main/java/org/apache/hop/workflow/actions/pipeline/ActionPipeline.java b/plugins/actions/pipeline/src/main/java/org/apache/hop/workflow/actions/pipeline/ActionPipeline.java
index 5e810e7919d..f2a8f06806a 100644
--- a/plugins/actions/pipeline/src/main/java/org/apache/hop/workflow/actions/pipeline/ActionPipeline.java
+++ b/plugins/actions/pipeline/src/main/java/org/apache/hop/workflow/actions/pipeline/ActionPipeline.java
@@ -493,8 +493,7 @@ public Result execute(Result result, int nr) throws HopException {
}
runConfiguration = resolve(runConfiguration);
- log.logBasic(
- BaseMessages.getString(PKG, "ActionPipeline.RunConfig.Message", runConfiguration));
+ logBasic(BaseMessages.getString(PKG, "ActionPipeline.RunConfig.Message", runConfiguration));
// Create the pipeline from meta-data
//
diff --git a/plugins/actions/repeat/src/main/java/org/apache/hop/workflow/actions/repeat/Repeat.java b/plugins/actions/repeat/src/main/java/org/apache/hop/workflow/actions/repeat/Repeat.java
index 313d09f52a6..88253131cc3 100644
--- a/plugins/actions/repeat/src/main/java/org/apache/hop/workflow/actions/repeat/Repeat.java
+++ b/plugins/actions/repeat/src/main/java/org/apache/hop/workflow/actions/repeat/Repeat.java
@@ -175,8 +175,7 @@ public Result execute(Result prevResult, int nr) throws HopException {
executionResult = executePipelineOrWorkflow(realFilename, nr, executionResult, repetitionNr);
Result result = executionResult.result;
if (!result.getResult() || result.getNrErrors() > 0 || result.isStopped()) {
- log.logError(
- "The repeating work encountered and error or was stopped. This ends the loop.");
+ logError("The repeating work encountered and error or was stopped. This ends the loop.");
// On an false result, stop the loop
//
@@ -393,7 +392,7 @@ private ExecutionResult executeWorkflow(
boolean flagSet = workflow.getExtensionDataMap().get(REPEAT_END_LOOP) != null;
if (flagSet) {
- log.logBasic("End loop flag found, stopping loop.");
+ logBasic("End loop flag found, stopping loop.");
}
return new ExecutionResult(result, workflow, flagSet);
diff --git a/plugins/actions/sendnagiospassivecheck/src/main/java/org/apache/hop/workflow/actions/sendnagiospassivecheck/ActionSendNagiosPassiveCheck.java b/plugins/actions/sendnagiospassivecheck/src/main/java/org/apache/hop/workflow/actions/sendnagiospassivecheck/ActionSendNagiosPassiveCheck.java
index 4e5939875b1..9c9a7b2edff 100644
--- a/plugins/actions/sendnagiospassivecheck/src/main/java/org/apache/hop/workflow/actions/sendnagiospassivecheck/ActionSendNagiosPassiveCheck.java
+++ b/plugins/actions/sendnagiospassivecheck/src/main/java/org/apache/hop/workflow/actions/sendnagiospassivecheck/ActionSendNagiosPassiveCheck.java
@@ -398,7 +398,7 @@ public String getConnectionTimeOut() {
@Override
public Result execute(Result previousResult, int nr) {
- log.logBasic(BaseMessages.getString(PKG, "ActionSendNagiosPassiveCheck.Started", serverName));
+ logBasic(BaseMessages.getString(PKG, "ActionSendNagiosPassiveCheck.Started", serverName));
Result result = previousResult;
result.setNrErrors(1);
@@ -491,7 +491,7 @@ public Result execute(Result previousResult, int nr) {
result.setResult(true);
} catch (Exception e) {
- log.logError(
+ logError(
BaseMessages.getString(PKG, "ActionSendNagiosPassiveCheck.ErrorGetting", e.toString()));
}
diff --git a/plugins/actions/setvariables/src/main/java/org/apache/hop/workflow/actions/setvariables/ActionSetVariables.java b/plugins/actions/setvariables/src/main/java/org/apache/hop/workflow/actions/setvariables/ActionSetVariables.java
index dc879ddb653..3acf62a2e5d 100644
--- a/plugins/actions/setvariables/src/main/java/org/apache/hop/workflow/actions/setvariables/ActionSetVariables.java
+++ b/plugins/actions/setvariables/src/main/java/org/apache/hop/workflow/actions/setvariables/ActionSetVariables.java
@@ -313,7 +313,7 @@ public Result execute(Result result, int nr) throws HopException {
}
// ok we can process this line
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG, "ActionSetVariables.Log.SetVariableToValue", name, value));
diff --git a/plugins/actions/shell/src/main/java/org/apache/hop/workflow/actions/shell/ActionShell.java b/plugins/actions/shell/src/main/java/org/apache/hop/workflow/actions/shell/ActionShell.java
index a771c9b0e42..d7eab685f99 100644
--- a/plugins/actions/shell/src/main/java/org/apache/hop/workflow/actions/shell/ActionShell.java
+++ b/plugins/actions/shell/src/main/java/org/apache/hop/workflow/actions/shell/ActionShell.java
@@ -310,7 +310,7 @@ public Result execute(Result result, int nr) throws HopException {
shellLogLevel = logFileLevel;
}
- log.setLogLevel(shellLogLevel);
+ setLogLevel(shellLogLevel);
result.setEntryNr(nr);
@@ -329,7 +329,7 @@ public Result execute(Result result, int nr) throws HopException {
boolean first = true;
List rows = result.getRows();
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG, "ActionShell.Log.FoundPreviousRows", "" + (rows != null ? rows.size() : 0)));
@@ -413,7 +413,7 @@ private void executeShell(Result result, List cmdRows, String[]
String[] base = null;
List cmds = new ArrayList<>();
- if (log.isBasic()) {
+ if (isBasic()) {
logBasic(BaseMessages.getString(PKG, "ActionShell.RunningOn", Const.getSystemOs()));
}
@@ -529,7 +529,7 @@ private void executeShell(Result result, List cmdRows, String[]
}
command.append(it.next());
}
- if (log.isBasic()) {
+ if (isBasic()) {
logBasic(BaseMessages.getString(PKG, "ActionShell.ExecCommand", command.toString()));
}
@@ -551,10 +551,12 @@ private void executeShell(Result result, List cmdRows, String[]
Process proc = procBuilder.start();
// any error message?
- StreamLogger errorLogger = new StreamLogger(log, proc.getErrorStream(), "(stderr)", true);
+ StreamLogger errorLogger =
+ new StreamLogger(getLogChannel(), proc.getErrorStream(), "(stderr)", true);
// any output?
- StreamLogger outputLogger = new StreamLogger(log, proc.getInputStream(), "(stdout)");
+ StreamLogger outputLogger =
+ new StreamLogger(getLogChannel(), proc.getInputStream(), "(stdout)");
// kick them off
Thread errorLoggerThread = new Thread(errorLogger);
@@ -563,14 +565,14 @@ private void executeShell(Result result, List cmdRows, String[]
outputLoggerThread.start();
proc.waitFor();
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(BaseMessages.getString(PKG, "ActionShell.CommandFinished", command.toString()));
}
// What's the exit status?
result.setExitStatus(proc.exitValue());
if (result.getExitStatus() != 0) {
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG,
@@ -654,9 +656,9 @@ private FileObject createTemporaryShellFile(FileObject tempFile, String fileCont
Process proc = procBuilder.start();
// Eat/log stderr/stdout all messages in a different thread...
StreamLogger errorLogger =
- new StreamLogger(log, proc.getErrorStream(), toString() + " (stderr)");
+ new StreamLogger(getLogChannel(), proc.getErrorStream(), toString() + " (stderr)");
StreamLogger outputLogger =
- new StreamLogger(log, proc.getInputStream(), toString() + " (stdout)");
+ new StreamLogger(getLogChannel(), proc.getInputStream(), toString() + " (stdout)");
new Thread(errorLogger).start();
new Thread(outputLogger).start();
proc.waitFor();
diff --git a/plugins/actions/snmptrap/src/main/java/org/apache/hop/workflow/actions/snmptrap/ActionSNMPTrap.java b/plugins/actions/snmptrap/src/main/java/org/apache/hop/workflow/actions/snmptrap/ActionSNMPTrap.java
index 5186c965fea..fc2816ba772 100644
--- a/plugins/actions/snmptrap/src/main/java/org/apache/hop/workflow/actions/snmptrap/ActionSNMPTrap.java
+++ b/plugins/actions/snmptrap/src/main/java/org/apache/hop/workflow/actions/snmptrap/ActionSNMPTrap.java
@@ -332,7 +332,7 @@ public Result execute(Result previousResult, int nr) {
target.setVersion(SnmpConstants.version1);
target.setAddress(udpAddress);
if (target.getAddress().isValid()) {
- if (log.isDebug()) {
+ if (isDebug()) {
logDebug("Valid IP address");
}
} else {
@@ -359,7 +359,7 @@ public Result execute(Result previousResult, int nr) {
transMap.listen();
usertarget.setAddress(udpAddress);
if (usertarget.getAddress().isValid()) {
- if (log.isDebug()) {
+ if (isDebug()) {
logDebug("Valid IP address");
}
} else {
@@ -392,7 +392,7 @@ public Result execute(Result previousResult, int nr) {
new USM(
SecurityProtocols.getInstance(), new OctetString(MPv3.createLocalEngineID()), 0);
usm.addUser(new OctetString(userName), uu);
- if (log.isDebug()) {
+ if (isDebug()) {
logDebug("Valid Usm");
}
}
@@ -409,7 +409,7 @@ public Result execute(Result previousResult, int nr) {
response = snmp.send(pdu, usertarget);
}
- if (response != null && log.isDebug()) {
+ if (response != null && isDebug()) {
logDebug("Received response from: " + response.getPeerAddress() + response.toString());
}
diff --git a/plugins/actions/tableexists/src/main/java/org/apache/hop/workflow/actions/tableexists/ActionTableExists.java b/plugins/actions/tableexists/src/main/java/org/apache/hop/workflow/actions/tableexists/ActionTableExists.java
index 5bf4ce99aa0..61faf721044 100644
--- a/plugins/actions/tableexists/src/main/java/org/apache/hop/workflow/actions/tableexists/ActionTableExists.java
+++ b/plugins/actions/tableexists/src/main/java/org/apache/hop/workflow/actions/tableexists/ActionTableExists.java
@@ -131,13 +131,13 @@ public Result execute(Result previousResult, int nr) {
String realSchemaName = resolve(schemaName);
if (db.checkTableExists(realSchemaName, realTableName)) {
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(PKG, "TableExists.Log.TableExists", realTableName));
}
result.setResult(true);
} else {
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(PKG, "TableExists.Log.TableNotExists", realTableName));
}
diff --git a/plugins/actions/truncatetables/src/main/java/org/apache/hop/workflow/actions/truncatetables/ActionTruncateTables.java b/plugins/actions/truncatetables/src/main/java/org/apache/hop/workflow/actions/truncatetables/ActionTruncateTables.java
index 9239db6fd7d..4d5c345f7b3 100644
--- a/plugins/actions/truncatetables/src/main/java/org/apache/hop/workflow/actions/truncatetables/ActionTruncateTables.java
+++ b/plugins/actions/truncatetables/src/main/java/org/apache/hop/workflow/actions/truncatetables/ActionTruncateTables.java
@@ -106,7 +106,7 @@ private boolean truncateTables(String tableName, String schemaName, Database db)
db.truncateTable(tableName);
}
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(PKG, "ActionTruncateTables.Log.TableTruncated", tableName));
}
@@ -136,7 +136,7 @@ public Result execute(Result previousResult, int nr) {
nrSuccess = 0;
if (argFromPrevious) {
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG,
@@ -165,7 +165,7 @@ this, this, getParentWorkflowMeta().findDatabase(connection, getVariables()))) {
String schemaNamePrevious = resultRow.getString(1, null);
if (!Utils.isEmpty(tableNamePrevious)) {
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG,
@@ -194,7 +194,7 @@ this, this, getParentWorkflowMeta().findDatabase(connection, getVariables()))) {
String realTableName = resolve(tableItem.getTableName());
String realSchemaName = resolve(tableItem.getSchemaName());
if (!Utils.isEmpty(realTableName)) {
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG, "ActionTruncateTables.ProcessingArg", realTableName, realSchemaName));
diff --git a/plugins/actions/unzip/src/main/java/org/apache/hop/workflow/actions/unzip/ActionUnZip.java b/plugins/actions/unzip/src/main/java/org/apache/hop/workflow/actions/unzip/ActionUnZip.java
index 643936df8a0..8de237dc077 100644
--- a/plugins/actions/unzip/src/main/java/org/apache/hop/workflow/actions/unzip/ActionUnZip.java
+++ b/plugins/actions/unzip/src/main/java/org/apache/hop/workflow/actions/unzip/ActionUnZip.java
@@ -280,7 +280,7 @@ public Result execute(Result previousResult, int nr) {
successConditionBrokenExit = false;
if (isfromprevious) {
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG,
@@ -320,24 +320,24 @@ public Result execute(Result previousResult, int nr) {
if (!targetdir.exists()) {
if (createfolder) {
targetdir.createFolder();
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG, "ActionUnZip.Log.TargetFolderCreated", realTargetdirectory));
}
} else {
- log.logError(BaseMessages.getString(PKG, "ActionUnZip.TargetFolderNotFound.Label"));
+ logError(BaseMessages.getString(PKG, "ActionUnZip.TargetFolderNotFound.Label"));
exitaction = true;
}
} else {
if (targetdir.getType() != FileType.FOLDER) {
- log.logError(
+ logError(
BaseMessages.getString(
PKG, "ActionUnZip.TargetFolderNotFolder.Label", realTargetdirectory));
exitaction = true;
} else {
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG, "ActionUnZip.TargetFolderExists.Label", realTargetdirectory));
@@ -349,21 +349,20 @@ public Result execute(Result previousResult, int nr) {
// movetodirectory must be provided
if (afterunzip == 2) {
if (Utils.isEmpty(movetodirectory)) {
- log.logError(BaseMessages.getString(PKG, "ActionUnZip.MoveToDirectoryEmpty.Label"));
+ logError(BaseMessages.getString(PKG, "ActionUnZip.MoveToDirectoryEmpty.Label"));
exitaction = true;
} else {
movetodir = HopVfs.getFileObject(realMovetodirectory, getVariables());
if (!(movetodir.exists()) || movetodir.getType() != FileType.FOLDER) {
if (createMoveToDirectory) {
movetodir.createFolder();
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG, "ActionUnZip.Log.MoveToFolderCreated", realMovetodirectory));
}
} else {
- log.logError(
- BaseMessages.getString(PKG, "ActionUnZip.MoveToDirectoryNotExists.Label"));
+ logError(BaseMessages.getString(PKG, "ActionUnZip.MoveToDirectoryNotExists.Label"));
exitaction = true;
}
}
@@ -420,18 +419,18 @@ public Result execute(Result previousResult, int nr) {
} else {
fileObject = HopVfs.getFileObject(realFilenameSource, getVariables());
if (!fileObject.exists()) {
- log.logError(
+ logError(
BaseMessages.getString(
PKG, "ActionUnZip.ZipFile.NotExists.Label", realFilenameSource));
return result;
}
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(PKG, "ActionUnZip.Zip_FileExists.Label", realFilenameSource));
}
if (Utils.isEmpty(sourcedirectory)) {
- log.logError(BaseMessages.getString(PKG, "ActionUnZip.SourceFolderNotFound.Label"));
+ logError(BaseMessages.getString(PKG, "ActionUnZip.SourceFolderNotFound.Label"));
return result;
}
@@ -447,7 +446,7 @@ public Result execute(Result previousResult, int nr) {
realWildcardSource);
}
} catch (Exception e) {
- log.logError(
+ logError(
BaseMessages.getString(
PKG, "ActionUnZip.ErrorUnzip.Label", realFilenameSource, e.getMessage()));
updateErrors();
@@ -486,7 +485,7 @@ public Result execute(Result previousResult, int nr) {
}
private void displayResults() {
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed("=======================================");
logDetailed(BaseMessages.getString(PKG, "ActionUnZip.Log.Info.FilesInError", "" + nrErrors));
logDetailed(
@@ -600,7 +599,7 @@ private boolean unzipFile(
String unzipToFolder = realTargetdirectory;
try {
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG, "ActionUnZip.Log.ProcessingFile", sourceFileObject.toString()));
@@ -622,7 +621,7 @@ private boolean unzipFile(
if (!rootfolder.exists()) {
try {
rootfolder.createFolder();
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(PKG, "ActionUnZip.Log.RootFolderCreated", folderName));
}
@@ -683,7 +682,7 @@ public boolean includeFile(FileSelectInfo info) {
synchronized (HopVfs.getFileSystemManager(getVariables())) {
FileObject newFileObject = null;
try {
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG,
@@ -700,7 +699,7 @@ public boolean includeFile(FileSelectInfo info) {
if (item.getType().equals(FileType.FOLDER)) {
// Directory
//
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG, "ActionUnZip.CreatingDirectory.Label", newFileName));
@@ -732,7 +731,7 @@ public boolean includeFile(FileSelectInfo info) {
boolean take = takeThisFile(item, newFileName);
if (getIt && !getItexclude && take) {
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG,
@@ -755,7 +754,7 @@ public boolean includeFile(FileSelectInfo info) {
+ StringUtil.getFormattedDateTimeNow(true)
+ newFileName.substring(lastindexOfDot, lenstring);
- if (log.isDebug()) {
+ if (isDebug()) {
logDebug(
BaseMessages.getString(
PKG, "ActionUnZip.Log.CreatingUniqFile", newFileName));
@@ -840,7 +839,7 @@ public boolean includeFile(FileSelectInfo info) {
retval = true;
} catch (Exception e) {
updateErrors();
- log.logError(
+ logError(
BaseMessages.getString(
PKG, "ActionUnZip.ErrorUnzip.Label", sourceFileObject.toString(), e.getMessage()),
e);
@@ -863,7 +862,7 @@ private void doUnzipPostProcessing(
PKG, "ActionUnZip.Cant_Delete_File.Label", sourceFileObject.toString()));
}
// File deleted
- if (log.isDebug()) {
+ if (isDebug()) {
logDebug(
BaseMessages.getString(
PKG, "ActionUnZip.File_Deleted.Label", sourceFileObject.toString()));
@@ -879,7 +878,7 @@ private void doUnzipPostProcessing(
sourceFileObject.moveTo(destFile);
// File moved
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG,
@@ -962,16 +961,16 @@ private boolean takeThisFile(FileObject sourceFile, String destinationFile)
boolean retval = false;
File destination = new File(destinationFile);
if (!destination.exists()) {
- if (log.isDebug()) {
+ if (isDebug()) {
logDebug(BaseMessages.getString(PKG, "ActionUnZip.Log.CanNotFindFile", destinationFile));
}
return true;
}
- if (log.isDebug()) {
+ if (isDebug()) {
logDebug(BaseMessages.getString(PKG, "ActionUnZip.Log.FileExists", destinationFile));
}
if (iffileexist == IF_FILE_EXISTS_SKIP) {
- if (log.isDebug()) {
+ if (isDebug()) {
logDebug(BaseMessages.getString(PKG, "ActionUnZip.Log.FileSkip", destinationFile));
}
return false;
@@ -984,7 +983,7 @@ private boolean takeThisFile(FileObject sourceFile, String destinationFile)
}
if (iffileexist == IF_FILE_EXISTS_OVERWRITE) {
- if (log.isDebug()) {
+ if (isDebug()) {
logDebug(BaseMessages.getString(PKG, "ActionUnZip.Log.FileOverwrite", destinationFile));
}
return true;
@@ -995,7 +994,7 @@ private boolean takeThisFile(FileObject sourceFile, String destinationFile)
if (iffileexist == IF_FILE_EXISTS_OVERWRITE_DIFF_SIZE) {
if (entrySize != destinationSize) {
- if (log.isDebug()) {
+ if (isDebug()) {
logDebug(
BaseMessages.getString(
PKG,
@@ -1007,7 +1006,7 @@ private boolean takeThisFile(FileObject sourceFile, String destinationFile)
}
return true;
} else {
- if (log.isDebug()) {
+ if (isDebug()) {
logDebug(
BaseMessages.getString(
PKG,
@@ -1022,7 +1021,7 @@ private boolean takeThisFile(FileObject sourceFile, String destinationFile)
}
if (iffileexist == IF_FILE_EXISTS_OVERWRITE_EQUAL_SIZE) {
if (entrySize == destinationSize) {
- if (log.isDebug()) {
+ if (isDebug()) {
logDebug(
BaseMessages.getString(
PKG,
@@ -1034,7 +1033,7 @@ private boolean takeThisFile(FileObject sourceFile, String destinationFile)
}
return true;
} else {
- if (log.isDebug()) {
+ if (isDebug()) {
logDebug(
BaseMessages.getString(
PKG,
@@ -1049,7 +1048,7 @@ private boolean takeThisFile(FileObject sourceFile, String destinationFile)
}
if (iffileexist == IF_FILE_EXISTS_OVERWRITE_ZIP_BIG) {
if (entrySize > destinationSize) {
- if (log.isDebug()) {
+ if (isDebug()) {
logDebug(
BaseMessages.getString(
PKG,
@@ -1061,7 +1060,7 @@ private boolean takeThisFile(FileObject sourceFile, String destinationFile)
}
return true;
} else {
- if (log.isDebug()) {
+ if (isDebug()) {
logDebug(
BaseMessages.getString(
PKG,
@@ -1076,7 +1075,7 @@ private boolean takeThisFile(FileObject sourceFile, String destinationFile)
}
if (iffileexist == IF_FILE_EXISTS_OVERWRITE_ZIP_BIG_EQUAL) {
if (entrySize >= destinationSize) {
- if (log.isDebug()) {
+ if (isDebug()) {
logDebug(
BaseMessages.getString(
PKG,
@@ -1088,7 +1087,7 @@ private boolean takeThisFile(FileObject sourceFile, String destinationFile)
}
return true;
} else {
- if (log.isDebug()) {
+ if (isDebug()) {
logDebug(
BaseMessages.getString(
PKG,
@@ -1103,7 +1102,7 @@ private boolean takeThisFile(FileObject sourceFile, String destinationFile)
}
if (iffileexist == IF_FILE_EXISTS_OVERWRITE_ZIP_SMALL) {
if (entrySize < destinationSize) {
- if (log.isDebug()) {
+ if (isDebug()) {
logDebug(
BaseMessages.getString(
PKG,
@@ -1115,7 +1114,7 @@ private boolean takeThisFile(FileObject sourceFile, String destinationFile)
}
return true;
} else {
- if (log.isDebug()) {
+ if (isDebug()) {
logDebug(
BaseMessages.getString(
PKG,
@@ -1130,7 +1129,7 @@ private boolean takeThisFile(FileObject sourceFile, String destinationFile)
}
if (iffileexist == IF_FILE_EXISTS_OVERWRITE_ZIP_SMALL_EQUAL) {
if (entrySize <= destinationSize) {
- if (log.isDebug()) {
+ if (isDebug()) {
logDebug(
BaseMessages.getString(
PKG,
@@ -1142,7 +1141,7 @@ private boolean takeThisFile(FileObject sourceFile, String destinationFile)
}
return true;
} else {
- if (log.isDebug()) {
+ if (isDebug()) {
logDebug(
BaseMessages.getString(
PKG,
diff --git a/plugins/actions/waitforfile/src/main/java/org/apache/hop/workflow/actions/waitforfile/ActionWaitForFile.java b/plugins/actions/waitforfile/src/main/java/org/apache/hop/workflow/actions/waitforfile/ActionWaitForFile.java
index 4e10ecedefc..7d57fa9a944 100644
--- a/plugins/actions/waitforfile/src/main/java/org/apache/hop/workflow/actions/waitforfile/ActionWaitForFile.java
+++ b/plugins/actions/waitforfile/src/main/java/org/apache/hop/workflow/actions/waitforfile/ActionWaitForFile.java
@@ -138,7 +138,7 @@ public Result execute(Result previousResult, int nr) {
//
if (iMaximumTimeout < 0) {
iMaximumTimeout = Const.toInt(DEFAULT_MAXIMUM_TIMEOUT, 0);
- if (log.isBasic()) {
+ if (isBasic()) {
logBasic("Maximum timeout invalid, reset to " + iMaximumTimeout);
}
}
@@ -146,17 +146,17 @@ public Result execute(Result previousResult, int nr) {
if (iCycleTime < 1) {
// If lower than 1 set to the default
iCycleTime = Const.toInt(DEFAULT_CHECK_CYCLE_TIME, 1);
- if (log.isBasic()) {
+ if (isBasic()) {
logBasic("Check cycle time invalid, reset to " + iCycleTime);
}
}
if (iMaximumTimeout == 0) {
- if (log.isBasic()) {
+ if (isBasic()) {
logBasic("Waiting indefinitely for file [" + realFilename + "]");
}
} else {
- if (log.isBasic()) {
+ if (isBasic()) {
logBasic("Waiting " + iMaximumTimeout + " seconds for file [" + realFilename + "]");
}
}
@@ -167,7 +167,7 @@ public Result execute(Result previousResult, int nr) {
if (fileObject.exists()) {
// file exists, we're happy to exit
- if (log.isBasic()) {
+ if (isBasic()) {
logBasic("Detected file [" + realFilename + "] within timeout");
}
result.setResult(true);
@@ -192,12 +192,12 @@ public Result execute(Result previousResult, int nr) {
// file doesn't exist after timeout, either true or false
if (isSuccessOnTimeout()) {
- if (log.isBasic()) {
+ if (isBasic()) {
logBasic("Didn't detect file [" + realFilename + "] before timeout, success");
}
result.setResult(true);
} else {
- if (log.isBasic()) {
+ if (isBasic()) {
logBasic("Didn't detect file [" + realFilename + "] before timeout, failure");
}
result.setResult(false);
@@ -219,7 +219,7 @@ public Result execute(Result previousResult, int nr) {
try {
if (sleepTime > 0) {
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
"Sleeping "
+ sleepTime
@@ -241,10 +241,10 @@ public Result execute(Result previousResult, int nr) {
long oldSize = -1;
long newSize = fileObject.getContent().getSize();
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed("File [" + realFilename + "] is " + newSize + " bytes long");
}
- if (log.isBasic()) {
+ if (isBasic()) {
logBasic(
"Waiting until file ["
+ realFilename
@@ -254,7 +254,7 @@ public Result execute(Result previousResult, int nr) {
}
while (oldSize != newSize && !parentWorkflow.isStopped()) {
try {
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
"Sleeping "
+ iCycleTime
@@ -270,11 +270,11 @@ public Result execute(Result previousResult, int nr) {
}
oldSize = newSize;
newSize = fileObject.getContent().getSize();
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed("File [" + realFilename + "] is " + newSize + " bytes long");
}
}
- if (log.isBasic()) {
+ if (isBasic()) {
logBasic("Stopped waiting for file [" + realFilename + CONST_TO_STOP_GROWING);
}
}
diff --git a/plugins/actions/waitforsql/src/main/java/org/apache/hop/workflow/actions/waitforsql/ActionWaitForSql.java b/plugins/actions/waitforsql/src/main/java/org/apache/hop/workflow/actions/waitforsql/ActionWaitForSql.java
index 8d460d2a1d0..a314e1c96e8 100644
--- a/plugins/actions/waitforsql/src/main/java/org/apache/hop/workflow/actions/waitforsql/ActionWaitForSql.java
+++ b/plugins/actions/waitforsql/src/main/java/org/apache/hop/workflow/actions/waitforsql/ActionWaitForSql.java
@@ -251,7 +251,7 @@ public Result execute(Result previousResult, int nr) {
if (useVars) {
realCustomSql = resolve(realCustomSql);
}
- if (log.isDebug()) {
+ if (isDebug()) {
logDebug(
BaseMessages.getString(PKG, "ActionWaitForSQL.Log.EnteredCustomSQL", realCustomSql));
}
@@ -277,7 +277,7 @@ public Result execute(Result previousResult, int nr) {
long timeStart = System.currentTimeMillis() / 1000;
int nrRowsLimit = Const.toInt(resolve(rowsCountValue), 0);
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(PKG, "ActionWaitForSQL.Log.nrRowsLimit", "" + nrRowsLimit));
}
@@ -343,7 +343,7 @@ public Result execute(Result previousResult, int nr) {
}
try {
if (sleepTime > 0) {
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed("Sleeping " + sleepTime + " seconds before next check for SQL data");
}
Thread.sleep(sleepTime * 1000);
@@ -398,7 +398,7 @@ protected boolean sqlDataOK(
}
if (countStatement != null) {
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(PKG, "ActionWaitForSQL.Log.RunSQLStatement", countStatement));
}
@@ -408,7 +408,7 @@ protected boolean sqlDataOK(
if (ar != null) {
rowsCount = ar.size();
} else {
- if (log.isDebug()) {
+ if (isDebug()) {
logDebug(
BaseMessages.getString(
PKG, "ActionWaitForSQL.Log.customSQLreturnedNothing", countStatement));
@@ -421,7 +421,7 @@ protected boolean sqlDataOK(
rowsCount = row.getInteger(0);
}
}
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(PKG, "ActionWaitForSQL.Log.NrRowsReturned", "" + rowsCount));
}
diff --git a/plugins/actions/workflow/src/main/java/org/apache/hop/workflow/actions/workflow/ActionWorkflow.java b/plugins/actions/workflow/src/main/java/org/apache/hop/workflow/actions/workflow/ActionWorkflow.java
index 91da5147eb8..c7121c8ca1e 100644
--- a/plugins/actions/workflow/src/main/java/org/apache/hop/workflow/actions/workflow/ActionWorkflow.java
+++ b/plugins/actions/workflow/src/main/java/org/apache/hop/workflow/actions/workflow/ActionWorkflow.java
@@ -492,7 +492,8 @@ public Result execute(Result result, int nr) throws HopException {
// Link both ways!
workflow.getWorkflowTracker().setParentWorkflowTracker(parentWorkflow.getWorkflowTracker());
- ActionWorkflowRunner runner = new ActionWorkflowRunner(workflow, result, nr, log);
+ ActionWorkflowRunner runner =
+ new ActionWorkflowRunner(workflow, result, nr, getLogChannel());
Thread workflowRunnerThread = new Thread(runner);
// added UUID to thread name, otherwise threads do share names if workflows actions are
// executed in parallel in a
@@ -590,23 +591,23 @@ private boolean createParentFolder(String filename) {
parentfolder = HopVfs.getFileObject(filename).getParent();
if (!parentfolder.exists()) {
if (createParentFolder) {
- if (log.isDebug()) {
- log.logDebug(
+ if (isDebug()) {
+ logDebug(
BaseMessages.getString(
PKG,
"ActionWorkflow.Log.ParentLogFolderNotExist",
parentfolder.getName().toString()));
}
parentfolder.createFolder();
- if (log.isDebug()) {
- log.logDebug(
+ if (isDebug()) {
+ logDebug(
BaseMessages.getString(
PKG,
"ActionWorkflow.Log.ParentLogFolderCreated",
parentfolder.getName().toString()));
}
} else {
- log.logError(
+ logError(
BaseMessages.getString(
PKG,
"ActionWorkflow.Log.ParentLogFolderNotExist",
@@ -614,8 +615,8 @@ private boolean createParentFolder(String filename) {
resultat = false;
}
} else {
- if (log.isDebug()) {
- log.logDebug(
+ if (isDebug()) {
+ logDebug(
BaseMessages.getString(
PKG,
"ActionWorkflow.Log.ParentLogFolderExists",
@@ -624,7 +625,7 @@ private boolean createParentFolder(String filename) {
}
} catch (Exception e) {
resultat = false;
- log.logError(
+ logError(
BaseMessages.getString(PKG, "ActionWorkflow.Error.ChekingParentLogFolderTitle"),
BaseMessages.getString(
PKG,
diff --git a/plugins/actions/writetolog/src/main/java/org/apache/hop/workflow/actions/writetolog/ActionWriteToLog.java b/plugins/actions/writetolog/src/main/java/org/apache/hop/workflow/actions/writetolog/ActionWriteToLog.java
index 61670bdf804..cd206145cfd 100644
--- a/plugins/actions/writetolog/src/main/java/org/apache/hop/workflow/actions/writetolog/ActionWriteToLog.java
+++ b/plugins/actions/writetolog/src/main/java/org/apache/hop/workflow/actions/writetolog/ActionWriteToLog.java
@@ -67,13 +67,13 @@ public ActionWriteToLog() {
@Override
public Object clone() {
- ActionWriteToLog je = (ActionWriteToLog) super.clone();
- return je;
+ ActionWriteToLog action = (ActionWriteToLog) super.clone();
+ return action;
}
private class LogWriterObject implements ILoggingObject {
- private ILogChannel writerLog;
+ private ILogChannel log;
private LogLevel logLevel;
private ILoggingObject parent;
private String subject;
@@ -83,8 +83,8 @@ public LogWriterObject(String subject, ILoggingObject parent, LogLevel logLevel)
this.subject = subject;
this.parent = parent;
this.logLevel = logLevel;
- this.writerLog = new LogChannel(this, parent);
- this.containerObjectId = writerLog.getContainerObjectId();
+ this.log = new LogChannel(this, parent);
+ this.containerObjectId = log.getContainerObjectId();
}
@Override
@@ -94,7 +94,7 @@ public String getFilename() {
@Override
public String getLogChannelId() {
- return writerLog.getLogChannelId();
+ return log.getLogChannelId();
}
@Override
@@ -109,7 +109,7 @@ public String getObjectName() {
@Override
public LoggingObjectType getObjectType() {
- return LoggingObjectType.TRANSFORM;
+ return LoggingObjectType.ACTION;
}
@Override
@@ -118,7 +118,7 @@ public ILoggingObject getParent() {
}
public ILogChannel getLogChannel() {
- return writerLog;
+ return log;
}
@Override
@@ -142,22 +142,22 @@ public Date getRegistrationDate() {
@Override
public boolean isGatheringMetrics() {
- return log.isGatheringMetrics();
+ return parent.isGatheringMetrics();
}
@Override
public void setGatheringMetrics(boolean gatheringMetrics) {
- log.setGatheringMetrics(gatheringMetrics);
+ parent.setGatheringMetrics(gatheringMetrics);
}
@Override
public boolean isForcingSeparateLogging() {
- return log.isForcingSeparateLogging();
+ return parent.isForcingSeparateLogging();
}
@Override
public void setForcingSeparateLogging(boolean forcingSeparateLogging) {
- log.setForcingSeparateLogging(forcingSeparateLogging);
+ parent.setForcingSeparateLogging(forcingSeparateLogging);
}
}
@@ -180,32 +180,19 @@ public boolean evaluate(Result result) {
try {
switch (getActionLogLevel()) {
- case ERROR:
- logChannel.logError(message + Const.CR);
- break;
- case MINIMAL:
- logChannel.logMinimal(message + Const.CR);
- break;
- case BASIC:
- logChannel.logBasic(message + Const.CR);
- break;
- case DETAILED:
- logChannel.logDetailed(message + Const.CR);
- break;
- case DEBUG:
- logChannel.logDebug(message + Const.CR);
- break;
- case ROWLEVEL:
- logChannel.logRowlevel(message + Const.CR);
- break;
- default: // NOTHING
- break;
+ case ERROR -> logChannel.logError(message + Const.CR);
+ case MINIMAL -> logChannel.logMinimal(message + Const.CR);
+ case BASIC -> logChannel.logBasic(message + Const.CR);
+ case DETAILED -> logChannel.logDetailed(message + Const.CR);
+ case DEBUG -> logChannel.logDebug(message + Const.CR);
+ case ROWLEVEL -> logChannel.logRowlevel(message + Const.CR);
+ case NOTHING -> {}
}
return true;
} catch (Exception e) {
result.setNrErrors(1);
- log.logError(
+ logError(
BaseMessages.getString(PKG, "WriteToLog.Error.Label"),
BaseMessages.getString(PKG, "WriteToLog.Error.Description") + " : " + e.toString());
return false;
diff --git a/plugins/actions/xml/src/main/java/org/apache/hop/workflow/actions/xml/dtdvalidator/DtdValidator.java b/plugins/actions/xml/src/main/java/org/apache/hop/workflow/actions/xml/dtdvalidator/DtdValidator.java
index 2d4b63b3c59..25689275a91 100644
--- a/plugins/actions/xml/src/main/java/org/apache/hop/workflow/actions/xml/dtdvalidator/DtdValidator.java
+++ b/plugins/actions/xml/src/main/java/org/apache/hop/workflow/actions/xml/dtdvalidator/DtdValidator.java
@@ -115,7 +115,7 @@ public Result execute(Result previousResult, int nr) {
String realDTDfilename = getRealDTDfilename();
// Define a new DTD validator instance
- DtdValidatorUtil validator = new DtdValidatorUtil(log);
+ DtdValidatorUtil validator = new DtdValidatorUtil(getLogChannel());
// Set XML filename
validator.setXMLFilename(realxmlfilename);
if (dtdintern) {
@@ -130,7 +130,7 @@ public Result execute(Result previousResult, int nr) {
boolean status = validator.validate();
if (!status) {
// The XML file is invalid!
- log.logError(validator.getErrorMessage());
+ logError(validator.getErrorMessage());
result.setResult(false);
result.setNrErrors(validator.getNrErrors());
result.setLogText(validator.getErrorMessage());
diff --git a/plugins/actions/xml/src/main/java/org/apache/hop/workflow/actions/xml/xmlwellformed/XmlWellFormed.java b/plugins/actions/xml/src/main/java/org/apache/hop/workflow/actions/xml/xmlwellformed/XmlWellFormed.java
index 2bad348818e..e9c3888ed8c 100644
--- a/plugins/actions/xml/src/main/java/org/apache/hop/workflow/actions/xml/xmlwellformed/XmlWellFormed.java
+++ b/plugins/actions/xml/src/main/java/org/apache/hop/workflow/actions/xml/xmlwellformed/XmlWellFormed.java
@@ -217,7 +217,7 @@ public Result execute(Result previousResult, int nr) throws HopException {
String[] vSourceFileFolder = sourceFileFolders;
String[] vwildcard = wildcard;
- if (argFromPrevious && log.isDetailed()) {
+ if (argFromPrevious && isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG,
@@ -248,7 +248,7 @@ public Result execute(Result previousResult, int nr) throws HopException {
String vSourceFileFolderPrevious = resultRow.getString(0, null);
String vWildcardPrevious = resultRow.getString(1, null);
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG,
@@ -276,7 +276,7 @@ public Result execute(Result previousResult, int nr) throws HopException {
return result;
}
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG,
@@ -304,7 +304,7 @@ public Result execute(Result previousResult, int nr) throws HopException {
}
private void displayResults() {
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed("=======================================");
logDetailed(
BaseMessages.getString(PKG, "ActionXMLWellFormed.Log.Info.FilesInError", "" + nrErrors));
@@ -393,7 +393,7 @@ private boolean processFileFolder(
sourcefilefolder = HopVfs.getFileObject(realSourceFilefoldername);
if (sourcefilefolder.exists()) {
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG, "ActionXMLWellFormed.Log.FileExists", sourcefilefolder.toString()));
@@ -523,7 +523,7 @@ private boolean checkOneFile(FileObject file, Result result, IWorkflowEngine par
addFileToResultFilenames(HopVfs.getFilename(file), result, parentWorkflow);
}
} else {
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed("---------------------------");
logDetailed(
BaseMessages.getString(
@@ -563,7 +563,7 @@ private void addFileToResultFilenames(
toString());
result.getResultFiles().put(resultFile.getFile().toString(), resultFile);
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG, "ActionXMLWellFormed.Log.FileAddedToResultFilesName", fileaddentry));
diff --git a/plugins/actions/xml/src/main/java/org/apache/hop/workflow/actions/xml/xslt/Xslt.java b/plugins/actions/xml/src/main/java/org/apache/hop/workflow/actions/xml/xslt/Xslt.java
index ddce4c51817..a5739565601 100644
--- a/plugins/actions/xml/src/main/java/org/apache/hop/workflow/actions/xml/xslt/Xslt.java
+++ b/plugins/actions/xml/src/main/java/org/apache/hop/workflow/actions/xml/xslt/Xslt.java
@@ -302,7 +302,7 @@ public Result execute(Result previousResult, int nr) throws HopException {
}
List rows = result.getRows();
- if (isFilenamesFromPrevious() && log.isDetailed()) {
+ if (isFilenamesFromPrevious() && isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG, "ActionXSLT.Log.ArgFromPrevious.Found", (rows != null ? rows.size() : 0) + ""));
@@ -393,7 +393,7 @@ private boolean processOneXMLFile(
} else if (outputfile.exists() && ifFileExists == 1) {
// Do nothing
- if (log.isDebug()) {
+ if (isDebug()) {
logDebug(
BaseMessages.getString(PKG, CONST_ACTION_XSLT_OUPUT_FILE_EXISTS_1_LABEL)
+ outputfilename
@@ -421,7 +421,7 @@ private boolean processOneXMLFile(
// did not find wildcard
outputfilename = outputfilename + "_" + StringUtil.getFormattedDateTimeNow(true);
}
- if (log.isDebug()) {
+ if (isDebug()) {
logDebug(
BaseMessages.getString(PKG, CONST_ACTION_XSLT_OUPUT_FILE_EXISTS_1_LABEL)
+ outputfilename
@@ -441,8 +441,8 @@ private boolean processOneXMLFile(
factory = new net.sf.saxon.TransformerFactoryImpl();
}
- if (log.isDetailed()) {
- log.logDetailed(
+ if (isDetailed()) {
+ logDetailed(
BaseMessages.getString(PKG, "ActionXSL.Log.TransformerFactoryInfos"),
BaseMessages.getString(
PKG, "ActionXSL.Log.TransformerFactory", factory.getClass().getName()));
@@ -458,8 +458,8 @@ private boolean processOneXMLFile(
// Use the template to create a transformer
Transformer xformer = template.newTransformer();
- if (log.isDetailed()) {
- log.logDetailed(
+ if (isDetailed()) {
+ logDetailed(
BaseMessages.getString(PKG, "ActionXSL.Log.TransformerClassInfos"),
BaseMessages.getString(
PKG, "ActionXSL.Log.TransformerClass", xformer.getClass().getName()));
diff --git a/plugins/actions/zipfile/src/main/java/org/apache/hop/workflow/actions/zipfile/ActionZipFile.java b/plugins/actions/zipfile/src/main/java/org/apache/hop/workflow/actions/zipfile/ActionZipFile.java
index 79eb1f8f22c..40040ba3599 100644
--- a/plugins/actions/zipfile/src/main/java/org/apache/hop/workflow/actions/zipfile/ActionZipFile.java
+++ b/plugins/actions/zipfile/src/main/java/org/apache/hop/workflow/actions/zipfile/ActionZipFile.java
@@ -183,19 +183,19 @@ private boolean createParentFolder(String filename) {
parentfolder = HopVfs.getFileObject(filename, getVariables()).getParent();
if (!parentfolder.exists()) {
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG, "ActionZipFile.CanNotFindFolder", "" + parentfolder.getName()));
}
parentfolder.createFolder();
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG, "ActionZipFile.FolderCreated", "" + parentfolder.getName()));
}
} else {
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG, "ActionZipFile.FolderExists", "" + parentfolder.getName()));
@@ -255,7 +255,7 @@ public boolean processRowFile(
// Check if Zip File exists
if (fileObject.exists()) {
fileExists = true;
- if (log.isDebug()) {
+ if (isDebug()) {
logDebug(
BaseMessages.getString(PKG, "ActionZipFile.Zip_FileExists1.Label")
+ localrealZipfilename
@@ -356,7 +356,7 @@ public boolean processRowFile(
}
localrealZipfilename += "_" + StringUtil.getFormattedDateTimeNow(true) + ".zip";
- if (log.isDebug()) {
+ if (isDebug()) {
logDebug(
BaseMessages.getString(PKG, "ActionZipFile.Zip_FileNameChange1.Label")
+ localrealZipfilename
@@ -383,7 +383,7 @@ public boolean processRowFile(
+ tempFile.getAbsolutePath()
+ BaseMessages.getString(PKG, "ActionZipFile.Cant_Rename_Temp3.Label"));
}
- if (log.isDebug()) {
+ if (isDebug()) {
logDebug(
BaseMessages.getString(PKG, "ActionZipFile.Zip_FileAppend1.Label")
+ localrealZipfilename
@@ -391,7 +391,7 @@ public boolean processRowFile(
}
}
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(PKG, "ActionZipFile.Files_Found1.Label")
+ fileList.length
@@ -485,7 +485,7 @@ public boolean processRowFile(
&& !isTargetDirectory
&& !fileSet.contains(targetFilename)) {
// We can add the file to the Zip Archive
- if (log.isDebug()) {
+ if (isDebug()) {
logDebug(
BaseMessages.getString(PKG, "ActionZipFile.Add_FilesToZip1.Label")
+ fileList[i]
@@ -510,7 +510,7 @@ public boolean processRowFile(
}
}
- if (log.isBasic()) {
+ if (isBasic()) {
logBasic(
BaseMessages.getString(
PKG, "ActionZipFile.Log.TotalZippedFiles", "" + zippedFiles.size()));
@@ -668,7 +668,7 @@ private boolean moveFile(
success = false;
}
// File moved
- if (log.isDebug()) {
+ if (isDebug()) {
logDebug(
BaseMessages.getString(PKG, "ActionZipFile.File_Moved1.Label")
+ fileObjectd
@@ -693,7 +693,7 @@ private boolean deleteFile(
+ BaseMessages.getString(PKG, "ActionZipFile.Cant_Delete_File2.Label"));
}
// File deleted
- if (log.isDebug()) {
+ if (isDebug()) {
logDebug(
BaseMessages.getString(PKG, "ActionZipFile.File_Deleted1.Label")
+ localSourceFilename
@@ -813,7 +813,7 @@ public Result execute(Result previousResult, int nr) {
moveToDirectory = HopVfs.getFileObject(realMovetodirectory, getVariables());
if (moveToDirectory.exists()) {
if (moveToDirectory.getType() == FileType.FOLDER) {
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG, "ActionZipFile.Log.MoveToFolderExist", realMovetodirectory));
@@ -825,14 +825,14 @@ public Result execute(Result previousResult, int nr) {
PKG, "ActionZipFile.Log.MoveToFolderNotFolder", realMovetodirectory));
}
} else {
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG, "ActionZipFile.Log.MoveToFolderNotNotExist", realMovetodirectory));
}
if (createMoveToDirectory) {
moveToDirectory.createFolder();
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG, "ActionZipFile.Log.MoveToFolderCreaterd", realMovetodirectory));
@@ -871,7 +871,7 @@ public Result execute(Result previousResult, int nr) {
// arguments from previous
if (fromPrevious) {
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed(
BaseMessages.getString(
PKG, "ActionZipFile.ArgFromPrevious.Found", (rows != null ? rows.size() : 0) + ""));
diff --git a/plugins/databases/access/src/main/java/org/apache/hop/pipeline/transforms/accessoutput/AccessOutput.java b/plugins/databases/access/src/main/java/org/apache/hop/pipeline/transforms/accessoutput/AccessOutput.java
index 8b508043244..5c3cf428483 100644
--- a/plugins/databases/access/src/main/java/org/apache/hop/pipeline/transforms/accessoutput/AccessOutput.java
+++ b/plugins/databases/access/src/main/java/org/apache/hop/pipeline/transforms/accessoutput/AccessOutput.java
@@ -82,7 +82,7 @@ public boolean processRow() throws HopException {
writeToTable(row);
putRow(data.outputRowMeta, row); // in case we want it go further...
- if (checkFeedback(getLinesOutput()) && log.isBasic()) {
+ if (checkFeedback(getLinesOutput()) && isBasic()) {
logBasic("linenr " + getLinesOutput());
}
} catch (HopException e) {
@@ -99,7 +99,7 @@ public boolean processRow() throws HopException {
protected boolean writeToTable(Object[] row) throws HopValueException {
if (row == null) {
// Stop: last line or error encountered
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed("Last line inserted: stop");
}
return false;
@@ -194,7 +194,7 @@ public boolean init() {
protected boolean openFile() throws Exception {
data.oneFileOpened = true;
String fileName = resolve(meta.getFileName());
- if (log.isBasic()) {
+ if (isBasic()) {
logBasic(BaseMessages.getString(PKG, "AccessOutput.log.WritingToFile", fileName));
}
FileObject fileObject = HopVfs.getFileObject(fileName);
diff --git a/plugins/misc/testing/src/main/java/org/apache/hop/testing/transforms/exectests/ExecuteTests.java b/plugins/misc/testing/src/main/java/org/apache/hop/testing/transforms/exectests/ExecuteTests.java
index b4605be8261..08514db99df 100644
--- a/plugins/misc/testing/src/main/java/org/apache/hop/testing/transforms/exectests/ExecuteTests.java
+++ b/plugins/misc/testing/src/main/java/org/apache/hop/testing/transforms/exectests/ExecuteTests.java
@@ -56,14 +56,14 @@ public boolean init() {
data.hasPrevious = true;
if (StringUtils.isEmpty(meta.getTestNameInputField())) {
- log.logError(
+ logError(
"When this transform receives input it wants the name of a field to get the unit test name from to determine which transforms to execute");
setErrors(1);
return false;
}
}
} catch (Exception e) {
- log.logError("Error analyzing ", e);
+ logError("Error analyzing ", e);
setErrors(1);
return false;
}
diff --git a/plugins/tech/avro/src/main/java/org/apache/hop/avro/transforms/avroencode/AvroEncode.java b/plugins/tech/avro/src/main/java/org/apache/hop/avro/transforms/avroencode/AvroEncode.java
index ed5b49c4f8c..aa16433c3f2 100644
--- a/plugins/tech/avro/src/main/java/org/apache/hop/avro/transforms/avroencode/AvroEncode.java
+++ b/plugins/tech/avro/src/main/java/org/apache/hop/avro/transforms/avroencode/AvroEncode.java
@@ -78,8 +78,8 @@ public boolean processRow() throws HopException {
AvroEncodeMeta.createAvroSchema(
schemaName, namespace, documentation, getInputRowMeta(), meta.getSourceFields());
- if (log.isDetailed()) {
- log.logDetailed("Schema: " + data.avroSchema.toString(true));
+ if (isDetailed()) {
+ logDetailed("Schema: " + data.avroSchema.toString(true));
}
}
diff --git a/plugins/tech/avro/src/main/java/org/apache/hop/avro/transforms/avrooutput/AvroOutput.java b/plugins/tech/avro/src/main/java/org/apache/hop/avro/transforms/avrooutput/AvroOutput.java
index d36e6be37f8..025bf96c186 100644
--- a/plugins/tech/avro/src/main/java/org/apache/hop/avro/transforms/avrooutput/AvroOutput.java
+++ b/plugins/tech/avro/src/main/java/org/apache/hop/avro/transforms/avrooutput/AvroOutput.java
@@ -251,12 +251,12 @@ public void writeSchemaFile() throws HopException {
fields.add(avroField);
}
data.avroSchema = createAvroSchema(fields, "");
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed("Automatically generated Avro schema.");
}
if (meta.isWriteSchemaFile()) {
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed("Writing schema file.");
}
try {
@@ -267,18 +267,18 @@ public void writeSchemaFile() throws HopException {
}
OutputStream outputStream = getOutputStream(schemaFileName, false);
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed("Opening output stream in default encoding");
}
OutputStream schemaWriter = new BufferedOutputStream(outputStream, 5000);
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed("Opened new file with name [" + schemaFileName + "]");
}
schemaWriter.write(data.avroSchema.toString(true).getBytes());
schemaWriter.close();
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed("Closed schema file with name [" + schemaFileName + "]");
}
@@ -499,7 +499,7 @@ public String buildFilename(String filename) {
getCopy(),
getPartitionId(),
data.isBeamContext(),
- log.getLogChannelId(),
+ getLogChannelId(),
data.getBeamBundleNr());
}
@@ -521,12 +521,12 @@ public void openNewFile(String baseFilename) throws HopException {
OutputStream outputStream = getOutputStream(filename, false);
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed("Opening output stream in default encoding");
}
data.writer = new BufferedOutputStream(outputStream, 5000);
- if (log.isDetailed()) {
+ if (isDetailed()) {
logDetailed("Opened new file with name [" + filename + "]");
}
} catch (Exception e) {
@@ -553,7 +553,7 @@ private boolean closeFile() {
if (data.writer != null) {
data.writer.flush();
- if (log.isDebug()) {
+ if (isDebug()) {
logDebug("Closing output stream");
}
if (data.dataFileWriter != null) {
@@ -564,7 +564,7 @@ private boolean closeFile() {
// also.
data.writer = null;
data.dataFileWriter = null;
- if (log.isDebug()) {
+ if (isDebug()) {
logDebug("Closed output stream");
}
}
diff --git a/plugins/tech/aws/src/main/java/org/apache/hop/pipeline/transforms/redshift/bulkloader/RedshiftBulkLoader.java b/plugins/tech/aws/src/main/java/org/apache/hop/pipeline/transforms/redshift/bulkloader/RedshiftBulkLoader.java
index c556d0823df..c58afb5ca2d 100644
--- a/plugins/tech/aws/src/main/java/org/apache/hop/pipeline/transforms/redshift/bulkloader/RedshiftBulkLoader.java
+++ b/plugins/tech/aws/src/main/java/org/apache/hop/pipeline/transforms/redshift/bulkloader/RedshiftBulkLoader.java
@@ -79,7 +79,7 @@ public boolean init() {
data.db.connect();
getDbFields();
- if (log.isBasic()) {
+ if (isBasic()) {
logBasic(
BaseMessages.getString(
PKG, "RedshiftBulkLoader.Connection.Connected", data.db.getDatabaseMeta()));
@@ -256,7 +256,7 @@ private boolean closeFile() {
data.writer.close();
}
data.writer = null;
- if (log.isDebug()) {
+ if (isDebug()) {
logDebug("Closing normal file ...");
}
diff --git a/plugins/tech/azure/src/main/java/org/apache/hop/pipeline/transforms/eventhubs/listen/AzureListener.java b/plugins/tech/azure/src/main/java/org/apache/hop/pipeline/transforms/eventhubs/listen/AzureListener.java
index 6c71c4f939f..6ba8b12f088 100644
--- a/plugins/tech/azure/src/main/java/org/apache/hop/pipeline/transforms/eventhubs/listen/AzureListener.java
+++ b/plugins/tech/azure/src/main/java/org/apache/hop/pipeline/transforms/eventhubs/listen/AzureListener.java
@@ -155,7 +155,7 @@ public void rowWrittenEvent(IRowMeta rowMeta, Object[] row)
data.stt = false;
}
- log.logDetailed("Creating connection string builder");
+ logDetailed("Creating connection string builder");
data.connectionStringBuilder =
new ConnectionStringBuilder()
.setNamespaceName(namespace)
@@ -163,11 +163,11 @@ public void rowWrittenEvent(IRowMeta rowMeta, Object[] row)
.setSasKeyName(sasKeyName)
.setSasKey(sasKey);
- log.logDetailed("Opening new executor service");
+ logDetailed("Opening new executor service");
data.executorService = Executors.newSingleThreadScheduledExecutor();
- log.logDetailed("Creating event hub client");
+ logDetailed("Creating event hub client");
try {
data.eventHubClient =
EventHubClient.createFromConnectionStringSync(
@@ -189,7 +189,7 @@ public void rowWrittenEvent(IRowMeta rowMeta, Object[] row)
} catch (Exception e) {
throw new HopException("Unable to set up events host processor", e);
}
- log.logDetailed("Set up events host named " + host.getHostName());
+ logDetailed("Set up events host named " + host.getHostName());
EventProcessorOptions options = new EventProcessorOptions();
options.setExceptionNotification(new AzureListenerErrorNotificationHandler(AzureListener.this));
diff --git a/plugins/tech/azure/src/main/java/org/apache/hop/pipeline/transforms/eventhubs/write/AzureWrite.java b/plugins/tech/azure/src/main/java/org/apache/hop/pipeline/transforms/eventhubs/write/AzureWrite.java
index 708541d967e..50d5f1a78c1 100644
--- a/plugins/tech/azure/src/main/java/org/apache/hop/pipeline/transforms/eventhubs/write/AzureWrite.java
+++ b/plugins/tech/azure/src/main/java/org/apache/hop/pipeline/transforms/eventhubs/write/AzureWrite.java
@@ -100,7 +100,7 @@ public boolean processRow() throws HopException {
"Unable to find field '" + meta.getMessageField() + "' in the Transform input");
}
- log.logBasic("Creating connection string");
+ logBasic("Creating connection string");
String namespace = resolve(meta.getNamespace());
String eventHubName = resolve(meta.getEventHubName());
@@ -114,9 +114,9 @@ public boolean processRow() throws HopException {
.setSasKeyName(sasKeyName)
.setSasKey(sasKey);
- log.logBasic("Opening new executor service");
+ logBasic("Opening new executor service");
data.executorService = Executors.newSingleThreadScheduledExecutor();
- log.logBasic("Creating event hub client");
+ logBasic("Creating event hub client");
try {
data.eventHubClient =
EventHubClient.createFromConnectionStringSync(
diff --git a/plugins/tech/cassandra/src/main/java/org/apache/hop/pipeline/transforms/cassandrainput/CassandraInput.java b/plugins/tech/cassandra/src/main/java/org/apache/hop/pipeline/transforms/cassandrainput/CassandraInput.java
index c0b34780b0b..3423478caa3 100644
--- a/plugins/tech/cassandra/src/main/java/org/apache/hop/pipeline/transforms/cassandrainput/CassandraInput.java
+++ b/plugins/tech/cassandra/src/main/java/org/apache/hop/pipeline/transforms/cassandrainput/CassandraInput.java
@@ -202,8 +202,8 @@ public boolean processRow() throws HopException {
putRow(data.outputRowMeta, r);
}
- if (log.isRowLevel()) {
- log.logRowlevel(toString(), "Outputted row #" + getProcessed() + " : " + outRowData);
+ if (isRowLevel()) {
+ logRowlevel(toString(), "Outputted row #" + getProcessed() + " : " + outRowData);
}
if (checkFeedback(getProcessed())) {
@@ -249,7 +249,7 @@ protected void initQuery() throws HopException {
if (cqlHandler == null) {
cqlHandler = data.keyspace.getCQLRowHandler();
}
- cqlHandler.newRowQuery(this, tableName, queryS, compression.name(), "", log);
+ cqlHandler.newRowQuery(this, tableName, queryS, compression.name(), "", getLogChannel());
} catch (Exception e) {
closeConnection();
diff --git a/plugins/tech/cassandra/src/main/java/org/apache/hop/pipeline/transforms/cassandraoutput/CassandraOutput.java b/plugins/tech/cassandra/src/main/java/org/apache/hop/pipeline/transforms/cassandraoutput/CassandraOutput.java
index 23fe12b6d76..59033f78580 100644
--- a/plugins/tech/cassandra/src/main/java/org/apache/hop/pipeline/transforms/cassandraoutput/CassandraOutput.java
+++ b/plugins/tech/cassandra/src/main/java/org/apache/hop/pipeline/transforms/cassandraoutput/CassandraOutput.java
@@ -206,7 +206,7 @@ protected void initialize() throws HopException {
getInputRowMeta(),
keyIndexes,
resolve(getMeta().getCreateTableWithClause()),
- log);
+ getLogChannel());
if (!result) {
throw new HopException(
@@ -231,7 +231,7 @@ protected void initialize() throws HopException {
if (getMeta().isUpdateCassandraMeta()) {
// Update cassandra meta data for unknown incoming fields?
- keyspace.updateTableCQL3(tableName, getInputRowMeta(), keyIndexes, log);
+ keyspace.updateTableCQL3(tableName, getInputRowMeta(), keyIndexes, getLogChannel());
}
// get the table meta data
@@ -262,7 +262,7 @@ protected void initialize() throws HopException {
// Truncate (remove all data from) table first?
if (getMeta().isTruncateTable()) {
- keyspace.truncateTable(tableName, log);
+ keyspace.truncateTable(tableName, getLogChannel());
}
} finally {
if (connection != null) {
diff --git a/plugins/tech/cassandra/src/main/java/org/apache/hop/pipeline/transforms/cassandrasstableoutput/SSTableOutput.java b/plugins/tech/cassandra/src/main/java/org/apache/hop/pipeline/transforms/cassandrasstableoutput/SSTableOutput.java
index c45fdb51046..0a3088d617c 100644
--- a/plugins/tech/cassandra/src/main/java/org/apache/hop/pipeline/transforms/cassandrasstableoutput/SSTableOutput.java
+++ b/plugins/tech/cassandra/src/main/java/org/apache/hop/pipeline/transforms/cassandrasstableoutput/SSTableOutput.java
@@ -137,7 +137,7 @@ private void initialize() throws Exception {
writer = builder.build();
try {
- disableSystemExit(sm, log);
+ disableSystemExit(sm, getLogChannel());
writer.init();
} catch (Exception e) {
throw new RuntimeException(
diff --git a/plugins/tech/cassandra/src/main/java/org/apache/hop/workflow/actions/execcql/ExecCql.java b/plugins/tech/cassandra/src/main/java/org/apache/hop/workflow/actions/execcql/ExecCql.java
index a0f2bd7bd52..77d5c14820c 100644
--- a/plugins/tech/cassandra/src/main/java/org/apache/hop/workflow/actions/execcql/ExecCql.java
+++ b/plugins/tech/cassandra/src/main/java/org/apache/hop/workflow/actions/execcql/ExecCql.java
@@ -136,7 +136,8 @@ public Result execute(Result result, int nr) throws HopException {
cqlStatements = script;
}
- int nrExecuted = executeCqlStatements(this, log, result, cassandraConnection, cqlStatements);
+ int nrExecuted =
+ executeCqlStatements(this, getLogChannel(), result, cassandraConnection, cqlStatements);
if (result.getNrErrors() == 0) {
logBasic("Cassandra executed " + nrExecuted + " CQL commands without error");
diff --git a/plugins/tech/google/src/main/java/org/apache/hop/pipeline/transforms/googlesheets/GoogleSheetsInput.java b/plugins/tech/google/src/main/java/org/apache/hop/pipeline/transforms/googlesheets/GoogleSheetsInput.java
index 4cc49382908..e55f07b5a88 100644
--- a/plugins/tech/google/src/main/java/org/apache/hop/pipeline/transforms/googlesheets/GoogleSheetsInput.java
+++ b/plugins/tech/google/src/main/java/org/apache/hop/pipeline/transforms/googlesheets/GoogleSheetsInput.java
@@ -71,7 +71,7 @@ public boolean init() {
jsonFactory = JacksonFactory.getDefaultInstance();
httpTransport = GoogleNetHttpTransport.newTrustedTransport();
} catch (Exception e) {
- log.logError("cannot initiate HTTP transport" + e.getMessage());
+ logError("cannot initiate HTTP transport" + e.getMessage());
return false;
}
@@ -94,7 +94,7 @@ public boolean init() {
ValueRange response =
service.spreadsheets().values().get(resolve(meta.getSpreadsheetKey()), range).execute();
if (response == null) {
- log.logError(
+ logError(
"No data found for worksheet : "
+ resolve(meta.getWorksheetId())
+ CONST_IN_SPREADSHEET
@@ -102,7 +102,7 @@ public boolean init() {
return false;
} else {
List> values = response.getValues();
- log.logBasic("Reading Sheet, found: " + values.size() + " rows");
+ logBasic("Reading Sheet, found: " + values.size() + " rows");
if (values == null || values.isEmpty()) {
throw new HopTransformException(
"No response found for worksheet : "
@@ -114,7 +114,7 @@ public boolean init() {
}
}
} catch (Exception e) {
- log.logError(
+ logError(
"Error: for worksheet : "
+ resolve(meta.getWorksheetId())
+ CONST_IN_SPREADSHEET
@@ -247,7 +247,7 @@ private Object[] readRow() {
}
}
} else {
- log.logBasic(
+ logBasic(
"Finished reading last row "
+ Integer.toString(data.currentRow)
+ " / "
@@ -256,7 +256,7 @@ private Object[] readRow() {
}
return outputRowData;
} catch (Exception e) {
- log.logError("Exception reading value :" + e.getMessage());
+ logError("Exception reading value :" + e.getMessage());
return null;
}
}
diff --git a/plugins/tech/google/src/main/java/org/apache/hop/pipeline/transforms/googlesheets/GoogleSheetsOutput.java b/plugins/tech/google/src/main/java/org/apache/hop/pipeline/transforms/googlesheets/GoogleSheetsOutput.java
index 0b145fca0ad..feb71d48414 100644
--- a/plugins/tech/google/src/main/java/org/apache/hop/pipeline/transforms/googlesheets/GoogleSheetsOutput.java
+++ b/plugins/tech/google/src/main/java/org/apache/hop/pipeline/transforms/googlesheets/GoogleSheetsOutput.java
@@ -118,7 +118,7 @@ public boolean init() {
// log.logBasic(wsID+" VS "+spreadsheet.getId());
if (spreadsheetID.equals(spreadsheet.getId())) {
exists = true; // file exists
- log.logBasic("Spreadsheet:" + spreadsheetID + " exists");
+ logBasic("Spreadsheet:" + spreadsheetID + " exists");
}
}
@@ -195,7 +195,7 @@ credential, resolve(meta.getTimeout())))
new UpdateSheetPropertiesRequest().setProperties(title);
// set fields you want to update
rename.setFields("title");
- log.logBasic("Changing worksheet title to:" + resolve(meta.getWorksheetId()));
+ logBasic("Changing worksheet title to:" + resolve(meta.getWorksheetId()));
List requests = new ArrayList<>();
Request request1 = new Request().setUpdateSheetProperties(rename);
requests.add(request1);
@@ -205,7 +205,7 @@ credential, resolve(meta.getTimeout())))
data.service.spreadsheets().batchUpdate(spreadsheetID, requestBody).execute();
}
} else {
- log.logError("Append and Create options cannot be activated altogether");
+ logError("Append and Create options cannot be activated altogether");
return false;
}
@@ -221,18 +221,18 @@ credential, resolve(meta.getTimeout())))
public void onFailure(GoogleJsonError e, HttpHeaders responseHeaders)
throws IOException {
// Handle error
- log.logError("Failed sharing file" + e.getMessage());
+ logError("Failed sharing file" + e.getMessage());
}
@Override
public void onSuccess(Permission permission, HttpHeaders responseHeaders)
throws IOException {
- log.logBasic("Shared successfully : Permission ID: " + permission.getId());
+ logBasic("Shared successfully : Permission ID: " + permission.getId());
}
};
BatchRequest batch = service.batch();
if (resolve(meta.getShareEmail()) != null && !resolve(meta.getShareEmail()).isEmpty()) {
- log.logBasic("Sharing sheet with:" + resolve(meta.getShareEmail()));
+ logBasic("Sharing sheet with:" + resolve(meta.getShareEmail()));
Permission userPermission =
new Permission()
.setType("user")
@@ -247,7 +247,7 @@ public void onSuccess(Permission permission, HttpHeaders responseHeaders)
}
if (resolve(meta.getShareDomain()) != null
&& !resolve(meta.getShareDomain()).isEmpty()) {
- log.logBasic("Sharing sheet with domain:" + resolve(meta.getShareDomain()));
+ logBasic("Sharing sheet with domain:" + resolve(meta.getShareDomain()));
Permission domainPermission =
new Permission()
.setType("domain")
@@ -264,12 +264,12 @@ public void onSuccess(Permission permission, HttpHeaders responseHeaders)
}
if (!exists && !meta.isCreate()) {
- log.logError("File does not Exist");
+ logError("File does not Exist");
return false;
}
} catch (Exception e) {
- log.logError(
+ logError(
"Error: for worksheet : "
+ resolve(meta.getWorksheetId())
+ " in spreadsheet :"
diff --git a/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/actions/constraint/Neo4jConstraint.java b/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/actions/constraint/Neo4jConstraint.java
index b15bc999b8b..65b634d6bab 100644
--- a/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/actions/constraint/Neo4jConstraint.java
+++ b/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/actions/constraint/Neo4jConstraint.java
@@ -115,17 +115,17 @@ private void dropConstraint(final ConstraintUpdate constraintUpdate) throws HopE
// Run this cypher statement...
//
final String _cypher = cypher;
- try (Driver driver = connection.getDriver(log, this)) {
- try (Session session = connection.getSession(log, driver, this)) {
+ try (Driver driver = connection.getDriver(getLogChannel(), this)) {
+ try (Session session = connection.getSession(getLogChannel(), driver, this)) {
session.writeTransaction(
tx -> {
try {
- log.logDetailed("Dropping constraint with cypher: " + _cypher);
+ logDetailed("Dropping constraint with cypher: " + _cypher);
org.neo4j.driver.Result result = tx.run(_cypher);
result.consume();
return true;
} catch (Throwable e) {
- log.logError("Error dropping constraint with cypher [" + _cypher + "]", e);
+ logError("Error dropping constraint with cypher [" + _cypher + "]", e);
return false;
}
});
@@ -180,17 +180,17 @@ private void createConstraint(ConstraintUpdate constraintUpdate) throws HopExcep
// Run this cypher statement...
//
final String _cypher = cypher;
- try (Driver driver = connection.getDriver(log, this)) {
- try (Session session = connection.getSession(log, driver, this)) {
+ try (Driver driver = connection.getDriver(getLogChannel(), this)) {
+ try (Session session = connection.getSession(getLogChannel(), driver, this)) {
session.writeTransaction(
tx -> {
try {
- log.logDetailed("Creating constraint with cypher: " + _cypher);
+ logDetailed("Creating constraint with cypher: " + _cypher);
org.neo4j.driver.Result result = tx.run(_cypher);
result.consume();
return true;
} catch (Throwable e) {
- log.logError("Error creating constraint with cypher [" + _cypher + "]", e);
+ logError("Error creating constraint with cypher [" + _cypher + "]", e);
return false;
}
});
diff --git a/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/actions/cypherscript/CypherScript.java b/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/actions/cypherscript/CypherScript.java
index 81f361bcd6b..46344d29595 100644
--- a/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/actions/cypherscript/CypherScript.java
+++ b/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/actions/cypherscript/CypherScript.java
@@ -106,11 +106,11 @@ public Result execute(Result result, int nr) throws HopException {
int nrExecuted;
- try (Driver driver = connection.getDriver(log, this)) {
+ try (Driver driver = connection.getDriver(getLogChannel(), this)) {
// Connect to the database
//
- try (Session session = connection.getSession(log, driver, this)) {
+ try (Session session = connection.getSession(getLogChannel(), driver, this)) {
TransactionWork transactionWork =
transaction -> {
@@ -130,14 +130,14 @@ public Result execute(Result result, int nr) throws HopException {
if (StringUtils.isNotEmpty(cypher)) {
transaction.run(cypher);
executed++;
- log.logDetailed("Executed cypher statement: " + cypher);
+ logDetailed("Executed cypher statement: " + cypher);
}
}
// All statements executed successfully so commit
//
transaction.commit();
} catch (Exception e) {
- log.logError("Error executing cypher statements...", e);
+ logError("Error executing cypher statements...", e);
result.increaseErrors(1L);
transaction.rollback();
result.setResult(false);
diff --git a/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/actions/index/Neo4jIndex.java b/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/actions/index/Neo4jIndex.java
index 351b2a34ba4..d93b6d6842a 100644
--- a/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/actions/index/Neo4jIndex.java
+++ b/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/actions/index/Neo4jIndex.java
@@ -124,17 +124,17 @@ private void dropIndex(final IndexUpdate indexUpdate) throws HopException {
// Run this cypher statement...
//
final String _cypher = cypher;
- try (Driver driver = connection.getDriver(log, this)) {
- try (Session session = connection.getSession(log, driver, this)) {
+ try (Driver driver = connection.getDriver(getLogChannel(), this)) {
+ try (Session session = connection.getSession(getLogChannel(), driver, this)) {
session.writeTransaction(
tx -> {
try {
- log.logDetailed("Dropping index with cypher: " + _cypher);
+ logDetailed("Dropping index with cypher: " + _cypher);
org.neo4j.driver.Result result = tx.run(_cypher);
result.consume();
return true;
} catch (Throwable e) {
- log.logError("Error dropping index with cypher [" + _cypher + "]", e);
+ logError("Error dropping index with cypher [" + _cypher + "]", e);
return false;
}
});
@@ -178,17 +178,17 @@ private void createIndex(IndexUpdate indexUpdate) throws HopException {
// Run this cypher statement...
//
final String _cypher = cypher;
- try (Driver driver = connection.getDriver(log, this)) {
- try (Session session = connection.getSession(log, driver, this)) {
+ try (Driver driver = connection.getDriver(getLogChannel(), this)) {
+ try (Session session = connection.getSession(getLogChannel(), driver, this)) {
session.writeTransaction(
tx -> {
try {
- log.logDetailed("Creating index with cypher: " + _cypher);
+ logDetailed("Creating index with cypher: " + _cypher);
org.neo4j.driver.Result result = tx.run(_cypher);
result.consume();
return true;
} catch (Throwable e) {
- log.logError("Error creating index with cypher [" + _cypher + "]", e);
+ logError("Error creating index with cypher [" + _cypher + "]", e);
return false;
}
});
diff --git a/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/transforms/cypher/Cypher.java b/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/transforms/cypher/Cypher.java
index 77c2571e332..f18388ef294 100644
--- a/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/transforms/cypher/Cypher.java
+++ b/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/transforms/cypher/Cypher.java
@@ -70,7 +70,7 @@ public boolean init() {
// Connect to Neo4j
//
if (StringUtils.isEmpty(resolve(meta.getConnectionName()))) {
- log.logError("You need to specify a Neo4j connection to use in this transform");
+ logError("You need to specify a Neo4j connection to use in this transform");
return false;
}
try {
@@ -79,7 +79,7 @@ public boolean init() {
.getSerializer(NeoConnection.class)
.load(resolve(meta.getConnectionName()));
if (data.neoConnection == null) {
- log.logError(
+ logError(
"Connection '"
+ resolve(meta.getConnectionName())
+ "' could not be found in the metadata: "
@@ -87,7 +87,7 @@ public boolean init() {
return false;
}
} catch (HopException e) {
- log.logError(
+ logError(
"Could not gencsv Neo4j connection '"
+ resolve(meta.getConnectionName())
+ "' from the metastore",
@@ -101,7 +101,7 @@ public boolean init() {
//
int retries = Const.toInt(resolve(meta.getNrRetriesOnError()), 0);
if (retries < 0) {
- log.logError("The number of retries on an error should be larger than 0, not " + retries);
+ logError("The number of retries on an error should be larger than 0, not " + retries);
return false;
}
data.attempts = 1 + retries;
@@ -109,7 +109,7 @@ public boolean init() {
try {
createDriverSession();
} catch (Exception e) {
- log.logError(
+ logError(
"Unable to get or create Neo4j database driver for database '"
+ data.neoConnection.getName()
+ "'",
@@ -139,14 +139,14 @@ private void closeSessionDriver() {
}
private void createDriverSession() throws HopConfigException {
- data.driver = data.neoConnection.getDriver(log, this);
- data.session = data.neoConnection.getSession(log, data.driver, this);
+ data.driver = data.neoConnection.getDriver(getLogChannel(), this);
+ data.session = data.neoConnection.getSession(getLogChannel(), data.driver, this);
}
private void reconnect() throws HopConfigException {
closeSessionDriver();
- log.logBasic("RECONNECTING to database");
+ logBasic("RECONNECTING to database");
// Wait for 30 seconds before reconnecting.
// Let's give the server a breath of fresh air.
@@ -226,7 +226,7 @@ public boolean processRow() throws HopException {
if (meta.isCypherFromField()) {
data.cypher = getInputRowMeta().getString(row, data.cypherFieldIndex);
- log.logDetailed("Cypher statement from field is: " + data.cypher);
+ logDetailed("Cypher statement from field is: " + data.cypher);
}
// Do the value mapping and conversion to the parameters
@@ -356,7 +356,7 @@ private void runCypherStatementsBatch() throws HopException {
}
}
- if (log.isDebug()) {
+ if (isDebug()) {
logDebug("Processed " + nrProcessed + " statements");
}
@@ -380,7 +380,7 @@ private List