refactor: move [POLICY] entry to DEBUG, add [DETAIL-POLICY-CHECK] at caller

- Downgrade [POLICY] entry from INFO→DEBUG (redundant with caller logs)
- Add [DETAIL-POLICY-CHECK] debug log in detail() before policy check
- Enables distinguishing caller context: [DETAIL-POLICY] vs [LIST-PAGE-POLICY]
This commit is contained in:
hpd840321
2026-05-10 13:22:21 +08:00
parent 09b1bbe51e
commit 203005aafb
2 changed files with 3 additions and 1 deletions
@@ -65,7 +65,7 @@ public class TenantVisitorFloorPolicyService {
if (CollectionUtils.isEmpty(orgIds)) {
return Optional.empty();
}
log.info("[POLICY] entry orgIds={}", orgIds);
log.debug("[POLICY] entry orgIds={}", orgIds);
for (String id : orgIds) {
Optional<List<String>> zones = replacementZoneIdsIfPolicyActive(id);
if (zones.isPresent()) {
@@ -667,6 +667,8 @@ public class ImgPersonServiceImpl extends AbstractImagStoreService
int rawFloorCount = floorList.size();
this.logger.info("[DETAIL] personId={} listByImageId returned {} zones: {}",
param.getId(), rawFloorCount, floorList);
this.logger.debug("[DETAIL-POLICY-CHECK] personId={} orgIds={} checking policy...",
param.getId(), result.getOrganizationIds());
Optional<List<String>> replacementFloors =
this.tenantVisitorFloorPolicyService.replacementZoneIdsIfPolicyActive(
result.getOrganizationIds());