Fix NPE bug in LogSlot#entry when recording rule ID (#2980)

This commit is contained in:
Joseph Zhang 2022-11-30 23:46:46 +08:00 committed by LearningGp
parent e34d55273f
commit 9f3712eed7
1 changed files with 1 additions and 2 deletions

View File

@ -38,12 +38,11 @@ public class LogSlot extends AbstractLinkedProcessorSlot<DefaultNode> {
fireEntry(context, resourceWrapper, obj, count, prioritized, args);
} catch (BlockException e) {
EagleEyeLogUtil.log(resourceWrapper.getName(), e.getClass().getSimpleName(), e.getRuleLimitApp(),
context.getOrigin(), e.getRule().getId(), count);
context.getOrigin(), e.getRule() != null ? e.getRule().getId() : null, count);
throw e;
} catch (Throwable e) {
RecordLog.warn("Unexpected entry exception", e);
}
}
@Override