diff --git a/dcm4chee-arc-audit/src/main/java/org/dcm4chee/arc/audit/SoftwareConfigurationAuditService.java b/dcm4chee-arc-audit/src/main/java/org/dcm4chee/arc/audit/SoftwareConfigurationAuditService.java index d7ccd57cad..8078f8b1d3 100644 --- a/dcm4chee-arc-audit/src/main/java/org/dcm4chee/arc/audit/SoftwareConfigurationAuditService.java +++ b/dcm4chee-arc-audit/src/main/java/org/dcm4chee/arc/audit/SoftwareConfigurationAuditService.java @@ -60,7 +60,7 @@ static void audit(AuditLogger auditLogger, Path path, AuditUtils.EventType event EventIdentification eventIdentification = getEventIdentification(auditInfo, eventType); eventIdentification.setEventDateTime(getEventTime(path, auditLogger)); String archiveUserID = auditInfo.getField(AuditInfo.ARCHIVE_USER_ID); - ParticipantObjectIdentification archivePOI = archive(archiveUserID); + ParticipantObjectIdentification archivePOI = archive(archiveUserID, reader); if (auditInfo.getField(AuditInfo.CALLING_USERID) == null) { ActiveParticipant archive = archive(archiveUserID, AuditMessages.UserIDTypeCode.DeviceName, auditLogger); emitAuditMessage(auditLogger, eventIdentification, Collections.singletonList(archive), archivePOI); @@ -88,11 +88,15 @@ private static EventIdentification getEventIdentification(AuditInfo auditInfo, A return ei; } - private static ParticipantObjectIdentification archive(String archiveUserID) { + private static ParticipantObjectIdentification archive(String archiveUserID, SpoolFileReader reader) { ParticipantObjectIdentification archive = new ParticipantObjectIdentification(); archive.setParticipantObjectID(archiveUserID); archive.setParticipantObjectIDTypeCode(AuditMessages.ParticipantObjectIDTypeCode.DeviceName); archive.setParticipantObjectTypeCode(AuditMessages.ParticipantObjectTypeCode.SystemObject); + archive.getParticipantObjectDetail().add((AuditMessages.createParticipantObjectDetail("Alert Description", + !reader.getInstanceLines().isEmpty() + ? String.join("\n", reader.getInstanceLines()) + : null))); return archive; }