From 3440d450607ef18f5d6c2df11653b9b0fbd510dc Mon Sep 17 00:00:00 2001 From: Darin Kelkhoff Date: Tue, 9 Apr 2024 18:52:43 -0500 Subject: [PATCH] Remove usages of log4j's placeholders-based log formatting calls (some of which were accidental and wrong anyway) --- .../filesystem/local/actions/AbstractFilesystemAction.java | 5 +++-- .../java/com/kingsrook/qqq/slack/QSlackImplementation.java | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/qqq-backend-module-filesystem/src/main/java/com/kingsrook/qqq/backend/module/filesystem/local/actions/AbstractFilesystemAction.java b/qqq-backend-module-filesystem/src/main/java/com/kingsrook/qqq/backend/module/filesystem/local/actions/AbstractFilesystemAction.java index df687e90..c9fb807f 100644 --- a/qqq-backend-module-filesystem/src/main/java/com/kingsrook/qqq/backend/module/filesystem/local/actions/AbstractFilesystemAction.java +++ b/qqq-backend-module-filesystem/src/main/java/com/kingsrook/qqq/backend/module/filesystem/local/actions/AbstractFilesystemAction.java @@ -49,6 +49,7 @@ import com.kingsrook.qqq.backend.module.filesystem.base.model.metadata.AbstractF import com.kingsrook.qqq.backend.module.filesystem.base.utils.SharedFilesystemBackendModuleUtils; import com.kingsrook.qqq.backend.module.filesystem.exceptions.FilesystemException; import org.apache.commons.io.FileUtils; +import static com.kingsrook.qqq.backend.core.logging.LogUtils.logPair; /******************************************************************************* @@ -183,7 +184,7 @@ public class AbstractFilesystemAction extends AbstractBaseFilesystemAction // if the file doesn't exist, just exit with noop. don't throw an error - that should only // // happen if the "contract" of the method is broken, and the file still exists // ////////////////////////////////////////////////////////////////////////////////////////////// - LOG.debug("Not deleting file [{}], because it does not exist.", file); + LOG.debug("Not deleting file, because it does not exist.", logPair("file", file)); return; } @@ -218,7 +219,7 @@ public class AbstractFilesystemAction extends AbstractBaseFilesystemAction ////////////////////////////////////////////////////////////////////////////////////// if(!destinationParent.exists()) { - LOG.debug("Making destination directory {} for move", destinationParent.getAbsolutePath()); + LOG.debug("Making destination directory for move", logPair("directory", destinationParent.getAbsolutePath())); if(!destinationParent.mkdirs()) { throw (new FilesystemException("Failed to make destination directory " + destinationParent.getAbsolutePath() + " to move " + source + " into.")); diff --git a/qqq-middleware-slack/src/main/java/com/kingsrook/qqq/slack/QSlackImplementation.java b/qqq-middleware-slack/src/main/java/com/kingsrook/qqq/slack/QSlackImplementation.java index 56ee591c..97986500 100644 --- a/qqq-middleware-slack/src/main/java/com/kingsrook/qqq/slack/QSlackImplementation.java +++ b/qqq-middleware-slack/src/main/java/com/kingsrook/qqq/slack/QSlackImplementation.java @@ -662,11 +662,11 @@ public class QSlackImplementation ////////////////////////////////////////////////////////////////////////// // Print result, which includes information about the message (like TS) // ////////////////////////////////////////////////////////////////////////// - LOG.info("Slack post result {}", result); + LOG.info("Slack post result: " + result); } catch(IOException | SlackApiException e) { - LOG.error("error: {}", e.getMessage(), e); + LOG.error("error", e); } }