com.evolveum.midpoint.util.logging.Trace.isTraceEnabled()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(7.7k)|赞(0)|评价(0)|浏览(221)

本文整理了Java中com.evolveum.midpoint.util.logging.Trace.isTraceEnabled()方法的一些代码示例,展示了Trace.isTraceEnabled()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Trace.isTraceEnabled()方法的具体详情如下:
包路径:com.evolveum.midpoint.util.logging.Trace
类名称:Trace
方法名:isTraceEnabled

Trace.isTraceEnabled介绍

暂无

代码示例

代码示例来源:origin: Evolveum/midpoint

private static void log(String message, Object... params) {
  if (LOGGER.isTraceEnabled()) {
    LOGGER.trace(message, params);
  }
  if (PERFORMANCE_ADVISOR.isTraceEnabled()) {
    PERFORMANCE_ADVISOR.trace(message, params);
  }
}

代码示例来源:origin: Evolveum/midpoint

private <F extends FocusType> void traceObjectSynchronization(SynchronizationContext<F> syncCtx) {
  if (LOGGER.isTraceEnabled()) {
    LOGGER.trace("SYNCHRONIZATION determined policy: {}", syncCtx);
  }
}

代码示例来源:origin: Evolveum/midpoint

private void log(String message, Object... params) {
  if (LOGGER.isTraceEnabled()) {
    LOGGER.trace(message, params);
  }
  if (PERFORMANCE_ADVISOR.isTraceEnabled()) {
    PERFORMANCE_ADVISOR.trace(message, params);
  }
}

代码示例来源:origin: Evolveum/midpoint

public void logEnd(Trace LOGGER, Event event, EventHandlerType eventHandlerType, boolean result) {
  if (LOGGER.isTraceEnabled()) {
    LOGGER.trace("Finishing processing event " + event + " result = " + result);
  }
}

代码示例来源:origin: Evolveum/midpoint

protected void logNotApplicable(Event event, String reason) {
  if (LOGGER.isTraceEnabled()) {
    LOGGER.trace(
      "{} is not applicable for event {}, continuing in the handler chain; reason: {}",
      this.getClass().getSimpleName(), event.shortDump(), reason);
  }
}

代码示例来源:origin: Evolveum/midpoint

@Override
  public boolean handle(PrismObject<ShadowType> shadow, OperationResult objResult) {
    if (LOGGER.isTraceEnabled()) {
      LOGGER.trace("listResourceObjects: processing shadow: {}", SchemaDebugUtil.prettyPrint(shadow));
    }
    objectList.add(shadow);
    return true;
  }
};

代码示例来源:origin: Evolveum/midpoint

@PostConstruct
public void init() {
  hookRegistry.registerChangeHook(HOOK_URI, this);
  if (LOGGER.isTraceEnabled()) {
    LOGGER.trace("Notifier change hook registered.");
  }
}

代码示例来源:origin: Evolveum/midpoint

@PostConstruct
private void initialize() {
  if (LOGGER.isTraceEnabled()) {
    LOGGER.trace("Registering with taskManager as a handler for " + REPORT_CREATE_TASK_URI);
  }
  taskManager.registerHandler(REPORT_CREATE_TASK_URI, this);
}

代码示例来源:origin: Evolveum/midpoint

public int rememberBaseline() throws NumberFormatException, IOException, InterruptedException {
  baselineTotalFds = count();
  baselineLsofOutput = lsofOutput;
  baselineTypeMap = typeMap;
  baselineMiscMap = miscMap;
  baselineNodeMap = nodeMap;
  if (LOGGER.isTraceEnabled()) {
    LOGGER.trace("Baseline LSOF output:\n{}", baselineLsofOutput);
  }
  return baselineTotalFds;
}

代码示例来源:origin: Evolveum/midpoint

private void logOperationInformation(ModelContext context) {
  if (LOGGER.isTraceEnabled()) {
    @SuppressWarnings({"unchecked", "raw"})
    LensContext<?> lensContext = (LensContext<?>) context;
    try {
      medic.traceContext(LOGGER, "WORKFLOW (" + context.getState() + ")", "workflow processing", true, lensContext, false);
    } catch (SchemaException e) {
      throw new IllegalStateException("SchemaException when tracing model context: " + e.getMessage(), e);
    }
  }
}

代码示例来源:origin: Evolveum/midpoint

private <C extends Containerable> void logSubitemContainerDecision(AccessDecision subdecision, String location, PrismContainerValue<C> cval) {
  if (LOGGER.isTraceEnabled()) {
    if (subdecision != AccessDecision.ALLOW || InternalsConfig.isDetailedAuhotizationLog()) {
      LOGGER.trace("    container {} for {} (processed subitems): decision={}", cval.getPath(), location, subdecision);
    }
  }
}

代码示例来源:origin: Evolveum/midpoint

private void handleDeleteLeaf(String oid, Session session) {
  NativeQuery removeFromClosureQuery = session.createNativeQuery(
      "delete from " + CLOSURE_TABLE_NAME + " " +
          "where descendant_oid = :oid");
  removeFromClosureQuery.setParameter("oid", oid);
  int count = removeFromClosureQuery.executeUpdate();
  if (LOGGER.isTraceEnabled()) LOGGER.trace("DeleteLeaf: Removed {} records from closure table.", count);
}

代码示例来源:origin: Evolveum/midpoint

public static void logStackTrace(final Trace LOGGER, String message) {
  if (LOGGER.isTraceEnabled()) {
    if (message != null) {
      LOGGER.trace(message+":\n{}", dumpStackTrace(LoggingUtils.class));
    } else {
      LOGGER.trace("{}", dumpStackTrace(LoggingUtils.class));
    }
  }
}

代码示例来源:origin: Evolveum/midpoint

public static void processRuleWithException(@NotNull EvaluatedPolicyRule rule, Collection<EvaluatedPolicyRuleTrigger <?>> triggers,
     PolicyExceptionType policyException) {
  LOGGER.debug("Policy rule {} would be triggered, but there is an exception for it. Not triggering", rule.getName());
  if (LOGGER.isTraceEnabled()) {
    LOGGER.trace("Policy rule {} would be triggered, but there is an exception for it:\nTriggers:\n{}\nException:\n{}",
        rule.getName(), DebugUtil.debugDump(triggers, 1), policyException);
  }
  ((EvaluatedPolicyRuleImpl)rule).addPolicyException(policyException);
}

代码示例来源:origin: Evolveum/midpoint

private Integer generate(Container container) {
  if (container.getId() != null && container.getId() != 0) {
    if (LOGGER.isTraceEnabled()) {
      LOGGER.trace("Created id='{}' for '{}'.", container.getId(), toString(container));
    }
    return container.getId();
  }
  throw new RuntimeException("Unknown id, should not happen.");
}

代码示例来源:origin: Evolveum/midpoint

private Serializable generate(L2Container container) {
  if (container.getId() != null && container.getId() != 0) {
    if (LOGGER.isTraceEnabled()) {
      LOGGER.trace("Created id='{}' for '{}'.", container.getId(), toString(container));
    }
    return container.getId();
  }
  throw new RuntimeException("Unknown id, should not happen: " + container);
}

代码示例来源:origin: Evolveum/midpoint

private Task submitTask(WfTaskCreationInstruction instruction, Task parentTask, WfConfigurationType wfConfigurationType, String channelOverride, OperationResult result) throws SchemaException, ObjectNotFoundException {
  Task wfTask = instruction.createTask(this, parentTask, wfConfigurationType);
  if (channelOverride != null) {
    wfTask.setChannel(channelOverride);
  }
  if (LOGGER.isTraceEnabled()) {
    LOGGER.trace("Switching workflow root or child task to background:\n{}", wfTask.debugDump());
  }
  taskManager.switchToBackground(wfTask, result);
  return wfTask;
}

代码示例来源:origin: Evolveum/midpoint

private <T extends ObjectType, F extends FocusType> boolean alreadyExecuted(ObjectDelta<T> objectDelta,
    LensElementContext<T> objectContext) {
  if (objectContext == null) {
    return false;
  }
  if (LOGGER.isTraceEnabled()) {
    LOGGER.trace("Checking for already executed delta:\n{}\nIn deltas:\n{}", objectDelta.debugDump(),
        DebugUtil.debugDump(objectContext.getExecutedDeltas()));
  }
  return ObjectDeltaOperation.containsDelta(objectContext.getExecutedDeltas(), objectDelta);
}

代码示例来源:origin: Evolveum/midpoint

private void logFailDump() {
  LOGGER.debug("types:\n{}", diffMap(baselineTypeMap, typeMap));
  LOGGER.debug("misc:\n{}", diffMap(baselineMiscMap, miscMap));
  LOGGER.debug("nodes:\n{}", diffNodeMap());
  if (LOGGER.isTraceEnabled()) {
    LOGGER.trace("LSOF output:\n{}", lsofOutput);
  }
}

代码示例来源:origin: Evolveum/midpoint

private void recompute(PrismObject<FocusType> focalObject, ModelExecuteOptions options, Task task, OperationResult result) throws SchemaException,
    ObjectNotFoundException, ExpressionEvaluationException, CommunicationException, ObjectAlreadyExistsException,
    ConfigurationException, PolicyViolationException, SecurityViolationException, PreconditionViolationException {
  LOGGER.trace("Recomputing object {}", focalObject);
  LensContext<FocusType> syncContext = contextFactory.createRecomputeContext(focalObject, options, task, result);
  if (LOGGER.isTraceEnabled()) {
    LOGGER.trace("Recomputing object {}: context:\n{}", focalObject, syncContext.debugDump());
  }
  clockwork.run(syncContext, task, result);
  LOGGER.trace("Recomputation of object {}: {}", focalObject, result.getStatus());
}

相关文章