public static void logPolicy(Logger log, Level level, String msg, PolicyComponent pc) { if (!log.isLoggable(level)) { return; } if (null == pc) { log.log(level, msg); return; } StringBuilder buf = new StringBuilder(); buf.append(msg); nl(buf); printPolicyComponent(pc, buf, 0); log.log(level, buf.toString()); }
public static void logPolicy(Logger log, Level level, String msg, PolicyComponent pc) { if (!log.isLoggable(level)) { return; } if (null == pc) { log.log(level, msg); return; } StringBuilder buf = new StringBuilder(); buf.append(msg); nl(buf); printPolicyComponent(pc, buf, 0); log.log(level, buf.toString()); }
buf.append(pc); buf.append(")"); nl(buf); if (pc instanceof PolicyContainingAssertion) { PolicyComponent nested = ((PolicyContainingAssertion)pc).getPolicy(); List<PolicyComponent> children = CastUtils.cast(((PolicyOperator)pc).getPolicyComponents(), PolicyComponent.class); nl(buf); for (PolicyComponent child : children) { printPolicyComponent(child, buf, level);
buf.append(pc); buf.append(")"); nl(buf); if (pc instanceof PolicyContainingAssertion) { PolicyComponent nested = ((PolicyContainingAssertion)pc).getPolicy(); List<PolicyComponent> children = CastUtils.cast(((PolicyOperator)pc).getPolicyComponents(), PolicyComponent.class); nl(buf); for (PolicyComponent child : children) { printPolicyComponent(child, buf, level);