diff --git a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2ServerManager.java b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2ServerManager.java index 5ad8ef92557ef..1d9b723c36864 100644 --- a/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2ServerManager.java +++ b/components/camel-as2/camel-as2-api/src/main/java/org/apache/camel/component/as2/api/AS2ServerManager.java @@ -62,7 +62,7 @@ public void listen(String requestUriPattern, HttpRequestHandler handler) { try { as2ServerConnection.listen(requestUriPattern, handler); } catch (IOException e) { - LOG.error("Failed to listen for '" + requestUriPattern + "' requests: " + e.getMessage(), e); + LOG.error("Failed to listen for '{}' requests: {}", requestUriPattern, e.getMessage(), e); throw new RuntimeException("Failed to listen for '" + requestUriPattern + "' requests: " + e.getMessage(), e); } diff --git a/components/camel-aws-swf/src/main/java/org/apache/camel/component/aws/swf/SWFActivityConsumer.java b/components/camel-aws-swf/src/main/java/org/apache/camel/component/aws/swf/SWFActivityConsumer.java index 1f947a8c0222a..49cd6e7f0aa04 100644 --- a/components/camel-aws-swf/src/main/java/org/apache/camel/component/aws/swf/SWFActivityConsumer.java +++ b/components/camel-aws-swf/src/main/java/org/apache/camel/component/aws/swf/SWFActivityConsumer.java @@ -41,7 +41,7 @@ public SWFActivityConsumer(SWFEndpoint endpoint, Processor processor, SWFConfigu } public Object processActivity(Object[] inputParameters, String taskToken) throws Exception { - LOGGER.debug("Processing activity task: " + Arrays.toString(inputParameters)); + LOGGER.debug("Processing activity task: {}", Arrays.toString(inputParameters)); Exchange exchange = endpoint.createExchange(inputParameters, SWFConstants.EXECUTE_ACTION); exchange.getIn().setHeader(SWFConstants.TASK_TOKEN, taskToken); diff --git a/components/camel-aws-swf/src/main/java/org/apache/camel/component/aws/swf/SWFActivityProducer.java b/components/camel-aws-swf/src/main/java/org/apache/camel/component/aws/swf/SWFActivityProducer.java index cc29bcedfac9c..0e86b7fe7c814 100644 --- a/components/camel-aws-swf/src/main/java/org/apache/camel/component/aws/swf/SWFActivityProducer.java +++ b/components/camel-aws-swf/src/main/java/org/apache/camel/component/aws/swf/SWFActivityProducer.java @@ -41,7 +41,7 @@ public SWFActivityProducer(SWFEndpoint endpoint, CamelSWFActivityClient camelSWF public void process(Exchange exchange) throws Exception { String eventName = getEventName(exchange); String version = getVersion(exchange); - LOG.debug("scheduleActivity : " + eventName + " : " + version); + LOG.debug("scheduleActivity : {} : {}", eventName, version); Object result = camelSWFClient.scheduleActivity(eventName, version, exchange.getIn().getBody()); endpoint.setResult(exchange, result); diff --git a/components/camel-aws-swf/src/main/java/org/apache/camel/component/aws/swf/SWFWorkflowConsumer.java b/components/camel-aws-swf/src/main/java/org/apache/camel/component/aws/swf/SWFWorkflowConsumer.java index 48814f916577c..8105cdc60f430 100644 --- a/components/camel-aws-swf/src/main/java/org/apache/camel/component/aws/swf/SWFWorkflowConsumer.java +++ b/components/camel-aws-swf/src/main/java/org/apache/camel/component/aws/swf/SWFWorkflowConsumer.java @@ -43,7 +43,7 @@ public SWFWorkflowConsumer(SWFEndpoint endpoint, Processor processor, SWFConfigu } public Object processWorkflow(Object[] parameters, long startTime, boolean replaying) throws Exception { - LOGGER.debug("Processing workflow task: " + Arrays.toString(parameters)); + LOGGER.debug("Processing workflow task: {}", Arrays.toString(parameters)); Exchange exchange = endpoint.createExchange(parameters, SWFConstants.EXECUTE_ACTION); exchange.getIn().setHeader(SWFConstants.WORKFLOW_START_TIME, startTime); exchange.getIn().setHeader(SWFConstants.WORKFLOW_REPLAYING, replaying); @@ -53,7 +53,7 @@ public Object processWorkflow(Object[] parameters, long startTime, boolean repla } public void signalReceived(Object[] parameters) throws Exception { - LOGGER.debug("signalReceived: " + Arrays.toString(parameters)); + LOGGER.debug("signalReceived: {}", Arrays.toString(parameters)); Exchange exchange = endpoint.createExchange(parameters, SWFConstants.SIGNAL_RECEIVED_ACTION); exchange.setPattern(InOnly); @@ -61,7 +61,7 @@ public void signalReceived(Object[] parameters) throws Exception { } public Object getWorkflowState(Object parameters) throws Exception { - LOGGER.debug("getWorkflowState: " + parameters); + LOGGER.debug("getWorkflowState: {}", parameters); Exchange exchange = endpoint.createExchange(parameters, SWFConstants.GET_STATE_ACTION); getProcessor().process(exchange); diff --git a/components/camel-aws-swf/src/main/java/org/apache/camel/component/aws/swf/SWFWorkflowProducer.java b/components/camel-aws-swf/src/main/java/org/apache/camel/component/aws/swf/SWFWorkflowProducer.java index 79109a6a56df1..9ca4a63da1066 100644 --- a/components/camel-aws-swf/src/main/java/org/apache/camel/component/aws/swf/SWFWorkflowProducer.java +++ b/components/camel-aws-swf/src/main/java/org/apache/camel/component/aws/swf/SWFWorkflowProducer.java @@ -43,7 +43,7 @@ public SWFWorkflowProducer(SWFEndpoint endpoint, CamelSWFWorkflowClient camelSWF @Override public void process(Exchange exchange) throws Exception { - LOG.debug("processing workflow task " + exchange); + LOG.debug("processing workflow task {}", exchange); try { diff --git a/components/camel-bean/src/main/java/org/apache/camel/component/bean/DefaultBeanProcessorFactory.java b/components/camel-bean/src/main/java/org/apache/camel/component/bean/DefaultBeanProcessorFactory.java index 736c909469239..a31bcdf44ab04 100644 --- a/components/camel-bean/src/main/java/org/apache/camel/component/bean/DefaultBeanProcessorFactory.java +++ b/components/camel-bean/src/main/java/org/apache/camel/component/bean/DefaultBeanProcessorFactory.java @@ -124,7 +124,7 @@ public Processor createBeanProcessor( LOG.debug("Attempting to create new bean instance from class: {} via auto-wiring enabled", clazz); bean = CamelContextHelper.newInstance(camelContext, clazz); } catch (Throwable e) { - LOG.debug("Error creating new bean instance from class: " + clazz + ". This exception is ignored", e); + LOG.debug("Error creating new bean instance from class: {}. This exception is ignored", clazz, e); } } diff --git a/components/camel-box/camel-box-api/src/main/java/org/apache/camel/component/box/api/BoxCollaborationsManager.java b/components/camel-box/camel-box-api/src/main/java/org/apache/camel/component/box/api/BoxCollaborationsManager.java index b97710fd637cb..d4f22a9845ffb 100644 --- a/components/camel-box/camel-box-api/src/main/java/org/apache/camel/component/box/api/BoxCollaborationsManager.java +++ b/components/camel-box/camel-box-api/src/main/java/org/apache/camel/component/box/api/BoxCollaborationsManager.java @@ -87,8 +87,7 @@ public BoxCollaboration addFolderCollaboration( if (collaborator == null) { throw new IllegalArgumentException("Parameter 'collaborator' can not be null"); } - LOG.debug("Creating collaborations for folder(id=" + folderId + ") with collaborator(" - + collaborator.getID() + ")"); + LOG.debug("Creating collaborations for folder(id={}) with collaborator({})", folderId, collaborator.getID()); if (role == null) { throw new IllegalArgumentException("Parameter 'role' can not be null"); } @@ -113,7 +112,7 @@ public BoxCollaboration addFolderCollaboration( */ public BoxCollaboration addFolderCollaborationByEmail(String folderId, String email, BoxCollaboration.Role role) { try { - LOG.debug("Creating collaborations for folder(id=" + folderId + ") with collaborator(" + email + ")"); + LOG.debug("Creating collaborations for folder(id={}) with collaborator({})", folderId, email); if (folderId == null) { throw new IllegalArgumentException("Parameter 'folderId' can not be null"); } diff --git a/components/camel-box/camel-box-api/src/main/java/org/apache/camel/component/box/api/BoxCommentsManager.java b/components/camel-box/camel-box-api/src/main/java/org/apache/camel/component/box/api/BoxCommentsManager.java index d95f104b5989e..2f15796958d4a 100644 --- a/components/camel-box/camel-box-api/src/main/java/org/apache/camel/component/box/api/BoxCommentsManager.java +++ b/components/camel-box/camel-box-api/src/main/java/org/apache/camel/component/box/api/BoxCommentsManager.java @@ -55,7 +55,7 @@ public BoxCommentsManager(BoxAPIConnection boxConnection) { */ public BoxFile addFileComment(String fileId, String message) { try { - LOG.debug("Adding comment to file(id=" + fileId + ") to '" + message + "'"); + LOG.debug("Adding comment to file(id={}) to '{}'", fileId, message); if (fileId == null) { throw new IllegalArgumentException("Parameter 'fileId' can not be null"); } @@ -126,7 +126,7 @@ public BoxComment.Info getCommentInfo(String commentId) { */ public BoxComment replyToComment(String commentId, String message) { try { - LOG.debug("Replying to comment(id=" + commentId + ") with message=" + message); + LOG.debug("Replying to comment(id={}) with message={}", commentId, message); if (commentId == null) { throw new IllegalArgumentException("Parameter 'commentId' can not be null"); } @@ -150,7 +150,7 @@ public BoxComment replyToComment(String commentId, String message) { */ public BoxComment changeCommentMessage(String commentId, String message) { try { - LOG.debug("Changing comment(id=" + commentId + ") message=" + message); + LOG.debug("Changing comment(id={}) message={}", commentId, message); if (commentId == null) { throw new IllegalArgumentException("Parameter 'commentId' can not be null"); } diff --git a/components/camel-box/camel-box-api/src/main/java/org/apache/camel/component/box/api/BoxEventLogsManager.java b/components/camel-box/camel-box-api/src/main/java/org/apache/camel/component/box/api/BoxEventLogsManager.java index 765252c5c6cc7..7554596202532 100644 --- a/components/camel-box/camel-box-api/src/main/java/org/apache/camel/component/box/api/BoxEventLogsManager.java +++ b/components/camel-box/camel-box-api/src/main/java/org/apache/camel/component/box/api/BoxEventLogsManager.java @@ -63,10 +63,10 @@ public BoxEventLogsManager(BoxAPIConnection boxConnection) { */ public List getEnterpriseEvents(String position, Date after, Date before, BoxEvent.Type... types) { try { - LOG.debug("Getting all enterprise events occuring between " - + (after == null ? after : DateFormat.getDateTimeInstance().format(after)) + " and " - + (before == null ? before : DateFormat.getDateTimeInstance().format(before)) - + (position == null ? position : (" starting at " + position))); + LOG.debug("Getting all enterprise events occurring between {} and {} {}", + after == null ? "unspecified date" : DateFormat.getDateTimeInstance().format(after), + before == null ? "unspecified date" : DateFormat.getDateTimeInstance().format(before), + position == null ? "" : (" starting at " + position)); if (after == null) { throw new IllegalArgumentException("Parameter 'after' can not be null"); diff --git a/components/camel-box/camel-box-api/src/main/java/org/apache/camel/component/box/api/BoxEventsManager.java b/components/camel-box/camel-box-api/src/main/java/org/apache/camel/component/box/api/BoxEventsManager.java index c31e99cb60365..855f7491649a4 100644 --- a/components/camel-box/camel-box-api/src/main/java/org/apache/camel/component/box/api/BoxEventsManager.java +++ b/components/camel-box/camel-box-api/src/main/java/org/apache/camel/component/box/api/BoxEventsManager.java @@ -55,12 +55,11 @@ public BoxEventsManager(BoxAPIConnection boxConnection) { */ public void listen(EventListener listener, Long startingPosition) { try { - LOG.debug("Listening for events with listener=" + listener + " at startingPosition=" + startingPosition); - if (listener == null) { LOG.debug("Parameter 'listener' is null: will not listen for events"); return; } + LOG.debug("Listening for events with listener={} at startingPosition={}", listener, startingPosition); if (startingPosition != null) { eventStream = new EventStream(boxConnection, startingPosition); diff --git a/components/camel-box/camel-box-api/src/main/java/org/apache/camel/component/box/api/BoxFilesManager.java b/components/camel-box/camel-box-api/src/main/java/org/apache/camel/component/box/api/BoxFilesManager.java index 1a0f4bf87030c..3a9d68e46bd3c 100644 --- a/components/camel-box/camel-box-api/src/main/java/org/apache/camel/component/box/api/BoxFilesManager.java +++ b/components/camel-box/camel-box-api/src/main/java/org/apache/camel/component/box/api/BoxFilesManager.java @@ -128,15 +128,15 @@ public BoxFile uploadFile( String parentFolderId, InputStream content, String fileName, Date created, Date modified, Long size, Boolean check, ProgressListener listener) { try { - LOG.debug("Uploading file with name '" + fileName + "' to parent_folder(id=" + parentFolderId + ")"); + LOG.debug("Uploading file with name '{}}' to parent_folder(id={}})", fileName, parentFolderId); if (parentFolderId == null) { throw new IllegalArgumentException("Parameter 'parentFolderId' can not be null"); } if (content == null) { - throw new IllegalArgumentException("Paramerer 'content' can not be null"); + throw new IllegalArgumentException("Parameter 'content' can not be null"); } if (fileName == null) { - throw new IllegalArgumentException("Paramerer 'fileName' can not be null"); + throw new IllegalArgumentException("Parameter 'fileName' can not be null"); } BoxFile boxFile = null; boolean uploadNewFile = true; @@ -241,7 +241,7 @@ public BoxFile uploadNewFileVersion( throw new IllegalArgumentException("Parameter 'fileId' can not be null"); } if (fileContent == null) { - throw new IllegalArgumentException("Paramerer 'fileContent' can not be null"); + throw new IllegalArgumentException("Parameter 'fileContent' can not be null"); } BoxFile file = new BoxFile(boxConnection, fileId); @@ -347,7 +347,7 @@ public OutputStream downloadPreviousFileVersion( String fileId, Integer version, OutputStream output, ProgressListener listener) { try { - LOG.debug("Downloading file(id=" + fileId + ", version=" + version + ")"); + LOG.debug("Downloading file(id={}, version={})", fileId, version); if (fileId == null) { throw new IllegalArgumentException("Parameter 'fileId' can not be null"); } @@ -384,7 +384,7 @@ public OutputStream downloadPreviousFileVersion( */ public BoxFileVersion promoteFileVersion(String fileId, Integer version) { try { - LOG.debug("Promoting file(id=" + fileId + ", version=" + version + ")"); + LOG.debug("Promoting file(id={}, version={})", fileId, version); if (fileId == null) { throw new IllegalArgumentException("Parameter 'fileId' can not be null"); } @@ -415,8 +415,9 @@ public BoxFileVersion promoteFileVersion(String fileId, Integer version) { */ public BoxFile copyFile(String fileId, String destinationFolderId, String newName) { try { - LOG.debug("Copying file(id=" + fileId + ") to destination_folder(id=" + destinationFolderId + ")" - + (newName == null ? "" : " with new name '" + newName + "'")); + LOG.debug("Copying file(id={}) to destination_folder(id={}) {}", + fileId, destinationFolderId, + newName == null ? "" : " with new name '" + newName + "'"); if (fileId == null) { throw new IllegalArgumentException("Parameter 'fileId' can not be null"); } @@ -447,8 +448,9 @@ public BoxFile copyFile(String fileId, String destinationFolderId, String newNam */ public BoxFile moveFile(String fileId, String destinationFolderId, String newName) { try { - LOG.debug("Moving file(id=" + fileId + ") to destination_folder(id=" + destinationFolderId + ")" - + (newName == null ? "" : " with new name '" + newName + "'")); + LOG.debug("Moving file(id={}) to destination_folder(id={}) {}", + fileId, destinationFolderId, + newName == null ? "" : " with new name '" + newName + "'"); if (fileId == null) { throw new IllegalArgumentException("Parameter 'fileId' can not be null"); } @@ -477,7 +479,7 @@ public BoxFile moveFile(String fileId, String destinationFolderId, String newNam */ public BoxFile renameFile(String fileId, String newFileName) { try { - LOG.debug("Renaming file(id=" + fileId + ") to '" + newFileName + "'"); + LOG.debug("Renaming file(id={}) to '{}'", fileId, newFileName); if (fileId == null) { throw new IllegalArgumentException("Parameter 'fileId' can not be null"); } @@ -521,7 +523,7 @@ public void deleteFile(String fileId) { */ public void deleteFileVersion(String fileId, Integer version) { try { - LOG.debug("Deleting file(id=" + fileId + ", version=" + version + ")"); + LOG.debug("Deleting file(id={}, version={})", fileId, version); if (fileId == null) { throw new IllegalArgumentException("Parameter 'fileId' can not be null"); } @@ -555,11 +557,11 @@ public BoxSharedLink createFileSharedLink( String fileId, BoxSharedLink.Access access, Date unshareDate, BoxSharedLink.Permissions permissions) { try { - LOG.debug("Creating shared link for file(id=" + fileId + ") with access=" + access - + (unshareDate == null - ? "" - : " unsharedDate=" + DateFormat.getDateTimeInstance().format(unshareDate) - + " permissions=" + permissions)); + LOG.debug("Creating shared link for file(id={}) with access={} {}", + fileId, access, unshareDate == null + ? "" + : " unsharedDate=" + DateFormat.getDateTimeInstance().format(unshareDate) + + " permissions=" + permissions); if (fileId == null) { throw new IllegalArgumentException("Parameter 'fileId' can not be null"); @@ -640,8 +642,8 @@ public byte[] getFileThumbnail( String fileId, BoxFile.ThumbnailFileType fileType, Integer minWidth, Integer minHeight, Integer maxWidth, Integer maxHeight) { try { - LOG.debug("Getting thumbnail for file(id=" + fileId + ") fileType=" + fileType + " minWidth=" + minWidth - + " minHeight=" + minHeight + " maxWidth=" + maxWidth + " maxHeight=" + maxHeight); + LOG.debug("Getting thumbnail for file(id={}) fileType={} minWidth={} minHeight={} maxWidth={} maxHeight={}", + fileId, fileType, minWidth, minHeight, maxWidth, maxHeight); if (fileId == null) { throw new IllegalArgumentException("Parameter 'fileId' can not be null"); @@ -787,7 +789,7 @@ public void deleteFileMetadata(String fileId) { */ public void checkUpload(String fileName, String parentFolderId, Long size) { try { - LOG.debug("Preflight check file with name '" + fileName + "' to parent_folder(id=" + parentFolderId + ")"); + LOG.debug("Preflight check file with name '{}' to parent_folder(id={})", fileName, parentFolderId); if (parentFolderId == null) { throw new IllegalArgumentException("Parameter 'parentFolderId' can not be null"); } diff --git a/components/camel-box/camel-box-api/src/main/java/org/apache/camel/component/box/api/BoxFoldersManager.java b/components/camel-box/camel-box-api/src/main/java/org/apache/camel/component/box/api/BoxFoldersManager.java index 7144ff5e7b986..b5a945c3679fd 100644 --- a/components/camel-box/camel-box-api/src/main/java/org/apache/camel/component/box/api/BoxFoldersManager.java +++ b/components/camel-box/camel-box-api/src/main/java/org/apache/camel/component/box/api/BoxFoldersManager.java @@ -113,8 +113,8 @@ public BoxFolder getFolder(String... path) { */ public Collection getFolderItems(String folderId, Long offset, Long limit, String... fields) { try { - LOG.debug("Getting folder items in folder(id=" + folderId + ") at offset=" + offset + " and limit=" + limit - + " with fields=" + Arrays.toString(fields)); + LOG.debug("Getting folder items in folder(id={}) at offset={} and limit={} with fields={}", + folderId, offset, limit, Arrays.toString(fields)); if (folderId == null) { throw new IllegalArgumentException("Parameter 'folderId' can not be null"); } @@ -153,12 +153,12 @@ public Collection getFolderItems(String folderId, Long offset, Lon */ public BoxFolder createFolder(String parentFolderId, String folderName) { try { - LOG.debug("Creating folder with name '" + folderName + "' in parent_folder(id=" + parentFolderId + ")"); + LOG.debug("Creating folder with name '{}' in parent_folder(id={})", folderName, parentFolderId); if (parentFolderId == null) { throw new IllegalArgumentException("Parameter 'parentFolderId' can not be null"); } if (folderName == null) { - throw new IllegalArgumentException("Paramerer 'folderName' can not be null"); + throw new IllegalArgumentException("Parameter 'folderName' can not be null"); } BoxFolder parentFolder = new BoxFolder(boxConnection, parentFolderId); return parentFolder.createFolder(folderName).getResource(); @@ -178,7 +178,7 @@ public BoxFolder createFolder(String parentFolderId, String folderName) { */ public BoxFolder createFolder(String parentFolderId, String... path) { try { - LOG.debug("Creating folder with path '" + Arrays.toString(path) + "' in parent_folder(id=" + parentFolderId + ")"); + LOG.debug("Creating folder with path '{}' in parent_folder(id={})", Arrays.toString(path), parentFolderId); if (parentFolderId == null) { throw new IllegalArgumentException("Parameter 'parentFolderId' can not be null"); } @@ -213,8 +213,8 @@ public BoxFolder createFolder(String parentFolderId, String... path) { */ public BoxFolder copyFolder(String folderId, String destinationFolderId, String newName) { try { - LOG.debug("Copying folder(id=" + folderId + ") to destination_folder(id=" + destinationFolderId + ")" - + (newName == null ? "" : " with new name '" + newName + "'")); + LOG.debug("Copying folder(id={}) to destination_folder(id={}) {}", + folderId, destinationFolderId, newName == null ? "" : " with new name '" + newName + "'"); if (folderId == null) { throw new IllegalArgumentException("Parameter 'folderId' can not be null"); } @@ -245,8 +245,8 @@ public BoxFolder copyFolder(String folderId, String destinationFolderId, String */ public BoxFolder moveFolder(String folderId, String destinationFolderId, String newName) { try { - LOG.debug("Moving folder(id=" + folderId + ") to destination_folder(id=" + destinationFolderId + ")" - + (newName == null ? "" : " with new name '" + newName + "'")); + LOG.debug("Moving folder(id={}) to destination_folder(id={}) {}", + folderId, destinationFolderId, newName == null ? "" : " with new name '" + newName + "'"); if (folderId == null) { throw new IllegalArgumentException("Parameter 'folderId' can not be null"); } @@ -275,7 +275,7 @@ public BoxFolder moveFolder(String folderId, String destinationFolderId, String */ public BoxFolder renameFolder(String folderId, String newFolderName) { try { - LOG.debug("Renaming folder(id=" + folderId + ") to '" + newFolderName + "'"); + LOG.debug("Renaming folder(id={}}) to '{}'", folderId, newFolderName); if (folderId == null) { throw new IllegalArgumentException("Parameter 'folderId' can not be null"); } @@ -377,11 +377,11 @@ public BoxSharedLink createFolderSharedLink( String folderId, BoxSharedLink.Access access, Date unshareDate, BoxSharedLink.Permissions permissions) { try { - LOG.debug("Creating shared link for folder(id=" + folderId + ") with access=" + access - + (unshareDate == null - ? "" - : " unsharedDate=" + DateFormat.getDateTimeInstance().format(unshareDate) - + " permissions=" + permissions)); + LOG.debug("Creating shared link for folder(id={}) with access={} {}", + folderId, access, unshareDate == null + ? "" + : " unsharedDate=" + DateFormat.getDateTimeInstance().format(unshareDate) + + " permissions=" + permissions); if (folderId == null) { throw new IllegalArgumentException("Parameter 'folderId' can not be null"); diff --git a/components/camel-box/camel-box-api/src/main/java/org/apache/camel/component/box/api/BoxGroupsManager.java b/components/camel-box/camel-box-api/src/main/java/org/apache/camel/component/box/api/BoxGroupsManager.java index 8c115cdacc295..771708560785d 100644 --- a/components/camel-box/camel-box-api/src/main/java/org/apache/camel/component/box/api/BoxGroupsManager.java +++ b/components/camel-box/camel-box-api/src/main/java/org/apache/camel/component/box/api/BoxGroupsManager.java @@ -198,8 +198,8 @@ public Collection getGroupMemberships(String groupId) { */ public BoxGroupMembership addGroupMembership(String groupId, String userId, BoxGroupMembership.Role role) { try { - LOG.debug("Adding user(id=" + userId + ") as member to group(id=" + groupId - + (role == null ? ")" : ") with role=" + role.name())); + LOG.debug("Adding user(id={}) as member to group(id={} {})", + userId, groupId, role == null ? "" : "with role=" + role.name()); if (groupId == null) { throw new IllegalArgumentException("Parameter 'groupId' can not be null"); } diff --git a/components/camel-box/camel-box-api/src/main/java/org/apache/camel/component/box/api/BoxTasksManager.java b/components/camel-box/camel-box-api/src/main/java/org/apache/camel/component/box/api/BoxTasksManager.java index e0bad51764f97..8719df2aa5f64 100644 --- a/components/camel-box/camel-box-api/src/main/java/org/apache/camel/component/box/api/BoxTasksManager.java +++ b/components/camel-box/camel-box-api/src/main/java/org/apache/camel/component/box/api/BoxTasksManager.java @@ -83,7 +83,7 @@ public List getFileTasks(String fileId) { */ public BoxTask addFileTask(String fileId, BoxTask.Action action, Date dueAt, String message) { try { - LOG.debug("Adding task to file(id=" + fileId + ") to '" + message + "'"); + LOG.debug("Adding task to file(id={}) to '{}'", fileId, message); if (fileId == null) { throw new IllegalArgumentException("Parameter 'fileId' can not be null"); } @@ -210,7 +210,7 @@ public BoxTask addAssignmentToTask(String taskId, BoxUser assignTo) { if (assignTo == null) { throw new IllegalArgumentException("Parameter 'assignTo' can not be null"); } - LOG.debug("Assigning task(id=" + taskId + ") to user(id=" + assignTo.getID() + ")"); + LOG.debug("Assigning task(id={}) to user(id={})", taskId, assignTo.getID()); BoxTask task = new BoxTask(boxConnection, taskId); task.addAssignment(assignTo); diff --git a/components/camel-box/camel-box-api/src/main/java/org/apache/camel/component/box/api/BoxUsersManager.java b/components/camel-box/camel-box-api/src/main/java/org/apache/camel/component/box/api/BoxUsersManager.java index 8573ecbd2e844..5ea8eacf7cd31 100644 --- a/components/camel-box/camel-box-api/src/main/java/org/apache/camel/component/box/api/BoxUsersManager.java +++ b/components/camel-box/camel-box-api/src/main/java/org/apache/camel/component/box/api/BoxUsersManager.java @@ -108,7 +108,7 @@ public List getAllEnterpriseOrExternalUsers(String filterTerm, Str */ public BoxUser createEnterpriseUser(String login, String name, CreateUserParams params) { try { - LOG.debug("Creating enterprise user with login=" + login + " name=" + name); + LOG.debug("Creating enterprise user with login={} name={}", login, name); if (login == null) { throw new IllegalArgumentException("Parameter 'login' can not be null"); } @@ -209,7 +209,7 @@ public BoxUser updateUserInfo(String userId, BoxUser.Info info) { */ public void deleteUser(String userId, boolean notifyUser, boolean force) { try { - LOG.debug("Deleting user(id=" + userId + ") notifyUser=" + notifyUser + " force=" + force); + LOG.debug("Deleting user(id={}) notifyUser={} force={}", userId, notifyUser, force); if (userId == null) { throw new IllegalArgumentException("Parameter 'fileId' can not be null"); } @@ -231,7 +231,7 @@ public void deleteUser(String userId, boolean notifyUser, boolean force) { */ public EmailAlias addUserEmailAlias(String userId, String email) { try { - LOG.debug("Adding email alias '" + email + "' to user(id=" + userId + ")"); + LOG.debug("Adding email alias '{}' to user(id={})", email, userId); if (userId == null) { throw new IllegalArgumentException("Parameter 'userId' can not be null"); } @@ -278,7 +278,7 @@ public Collection getUserEmailAlias(String userId) { */ public void deleteUserEmailAlias(String userId, String emailAliasId) { try { - LOG.debug("Deleting email_alias(" + emailAliasId + ") for user(id=" + userId + ")"); + LOG.debug("Deleting email_alias({}) for user(id={})", emailAliasId, userId); if (userId == null) { throw new IllegalArgumentException("Parameter 'userId' can not be null"); } @@ -303,7 +303,7 @@ public void deleteUserEmailAlias(String userId, String emailAliasId) { */ public BoxFolder.Info moveFolderToUser(String userId, String sourceUserId) { try { - LOG.debug("Moving root folder for user(id=" + sourceUserId + ") to user(id=" + userId + ")"); + LOG.debug("Moving root folder for user(id={}) to user(id={})", sourceUserId, userId); if (userId == null) { throw new IllegalArgumentException("Parameter 'userId' can not be null"); }