static boolean shouldLog(final TaskContext taskContext,
                             final Severity maxSeverity,
                             final boolean isTraceEnabled,
                             final boolean isIgnoreWarnings) {

        if (taskContext.isTerminated() || Thread.currentThread().isInterrupted()) {
            // If the task is terminated then lots of lookups will fail but this is expected behaviour
            // so no point logging
            return false;
        } else {
            return isTraceEnabled
                   || maxSeverity.greaterThanOrEqual(Severity.ERROR)
                   || (!isIgnoreWarnings && maxSeverity.greaterThanOrEqual(Severity.WARNING));
        }
    }
Log a lookup failing to return a value.  Whether it actually logs depends on things like
whether there were any errors, state of ignoreWarnings, state of trace, etc.
stroom-pipeline/src/main/java/stroom/pipeline/xsltfunctions/AbstractLookup.java