Skip to content

Commit

Permalink
3153 adding log
Browse files Browse the repository at this point in the history
  • Loading branch information
leif stawnyczy authored and leif stawnyczy committed Nov 10, 2021
1 parent e059f75 commit 1fdf64f
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.support.ConceptValidationOptions;
import ca.uhn.fhir.context.support.ValidationSupportContext;
import org.hl7.fhir.exceptions.TerminologyServiceException;
import org.hl7.fhir.common.hapi.validation.validator.ValidatorWrapper;
import org.hl7.fhir.instance.model.api.IBaseResource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.print.attribute.standard.Severity;

/**
* This validation support module may be placed at the end of a {@link ValidationSupportChain}
Expand All @@ -19,6 +20,8 @@
* in order to specify that unknown code systems should be allowed.
*/
public class UnknownCodeSystemWarningValidationSupport extends BaseValidationSupport {
private static final Logger ourLog = LoggerFactory.getLogger(UnknownCodeSystemWarningValidationSupport.class);

public static final IssueSeverity DEFAULT_SEVERITY = IssueSeverity.ERROR;

private IssueSeverity myNonExistentCodeSystemSeverity = DEFAULT_SEVERITY;
Expand Down Expand Up @@ -88,7 +91,8 @@ private boolean allowNonExistentCodeSystems() {
case FATAL:
return false;
default:
// TODO - log
ourLog.info("Unknown issue severity " + myNonExistentCodeSystemSeverity.name()
+ ". Treating as INFO/WARNING");
case WARNING:
case INFORMATION:
return true;
Expand Down

0 comments on commit 1fdf64f

Please sign in to comment.