forked from Onlineberatung/onlineBeratung-userService
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from virtualidentityag/staging
Staging
- Loading branch information
Showing
9 changed files
with
259 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
.../java/de/caritas/cob/userservice/api/workflow/delete/service/WorkflowErrorLogService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package de.caritas.cob.userservice.api.workflow.delete.service; | ||
|
||
import static org.apache.commons.collections4.CollectionUtils.isNotEmpty; | ||
|
||
import de.caritas.cob.userservice.api.workflow.delete.model.DeletionWorkflowError; | ||
import java.util.List; | ||
import lombok.RequiredArgsConstructor; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.springframework.stereotype.Service; | ||
|
||
/** Service class to log all deletion workflow errors. */ | ||
@Slf4j | ||
@Service | ||
@RequiredArgsConstructor | ||
public class WorkflowErrorLogService { | ||
|
||
public void logWorkflowErrors(List<DeletionWorkflowError> workflowErrors) { | ||
if (isNotEmpty(workflowErrors)) { | ||
workflowErrors.forEach( | ||
workflowError -> | ||
log.warn( | ||
"Errors during deletion workflow:" | ||
+ " SourceType = {}; " | ||
+ "TargetType = {}; " | ||
+ "Identifier = {}; " | ||
+ "Reason = {}; " | ||
+ "Timestamp = {}.", | ||
workflowError.getDeletionSourceType(), | ||
workflowError.getDeletionTargetType(), | ||
workflowError.getIdentifier(), | ||
workflowError.getReason(), | ||
workflowError.getTimestamp())); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.