Merge pull request #1528 from jamesagnew/ks-subscription-logging

fix subscription logging for delete
This commit is contained in:
Ken Stevens 2019-10-08 16:57:31 -04:00 committed by GitHub
commit 541f318504
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View File

@ -87,6 +87,10 @@ public class ResourceModifiedMessage extends BaseResourceMessage implements IRes
mySubscriptionId = theSubscriptionId;
}
public String getId() {
return myId;
}
public IIdType getId(FhirContext theCtx) {
IIdType retVal = null;
if (myId != null) {

View File

@ -84,7 +84,12 @@ public class SubscriptionDebugLogInterceptor {
public void step10_resourceModified(ResourceModifiedMessage theMessage) {
String value = Long.toString(System.currentTimeMillis());
theMessage.setAttribute(SUBSCRIPTION_DEBUG_LOG_INTERCEPTOR_PRECHECK, value);
log(EventCodeEnum.SUBS1, "Resource {} was submitted to the processing pipeline (op={})", theMessage.getPayloadId(), theMessage.getOperationType());
String resourceId = theMessage.getPayloadId();
if (resourceId == null) {
// Delete operations have no payload
resourceId = theMessage.getId();
}
log(EventCodeEnum.SUBS1, "Resource {} was submitted to the processing pipeline (op={})", resourceId, theMessage.getOperationType());
}
/*