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

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

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

Trace.debug介绍

暂无

代码示例

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

public static void displayPrismValuesCollection(String message, Collection<? extends PrismValue> collection) {
  System.out.println(OBJECT_TITLE_OUT_PREFIX + message);
  LOGGER.debug(OBJECT_TITLE_LOG_PREFIX + message);
  for (PrismValue v : collection) {
    System.out.println(DebugUtil.debugDump(v));
    LOGGER.debug("{}", DebugUtil.debugDump(v));
    System.out.println(OBJECT_LIST_SEPARATOR);
    LOGGER.debug(OBJECT_LIST_SEPARATOR);
  }
}

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

public static void displayCollection(String message, Collection<? extends DebugDumpable> collection) {
  System.out.println(OBJECT_TITLE_OUT_PREFIX + message);
  LOGGER.debug(OBJECT_TITLE_LOG_PREFIX + message);
  for (DebugDumpable c : CollectionUtils.emptyIfNull(collection)) {
    String s = DebugUtil.debugDump(c);
    System.out.println(s);
    LOGGER.debug("{}", s);
    System.out.println(OBJECT_LIST_SEPARATOR);
    LOGGER.debug(OBJECT_LIST_SEPARATOR);
  }
}

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

public static void display(String message, Collection collection) {
  String dump = DebugUtil.dump(collection);
  System.out.println(OBJECT_TITLE_OUT_PREFIX + message + "\n" + dump);
  LOGGER.debug(OBJECT_TITLE_LOG_PREFIX + message + "\n" + dump);
}

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

public static void display(String title, OperationResult result) {
  System.out.println(OBJECT_TITLE_OUT_PREFIX + title);
  String debugDump = result != null ? result.debugDump() : "(null)";
  System.out.println(debugDump);
  LOGGER.debug(OBJECT_TITLE_LOG_PREFIX + title  + "\n"
      + debugDump);
}

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

public static void display(String title, Throwable e) {
  String stackTrace = ExceptionUtils.getStackTrace(e);
  System.out.println(OBJECT_TITLE_OUT_PREFIX + title + ": "+e.getClass() + " " + e.getMessage());
  System.out.println(stackTrace);
  LOGGER.debug("{}{}: {} {}\n{}", OBJECT_TITLE_LOG_PREFIX, title, e.getClass(), e.getMessage(), stackTrace);
}

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

public static void displayContainerablesCollection(String message, Collection<? extends Containerable> collection) {
  System.out.println(OBJECT_TITLE_OUT_PREFIX + message);
  LOGGER.debug(OBJECT_TITLE_LOG_PREFIX + message);
  for (Containerable c : CollectionUtils.emptyIfNull(collection)) {
    String s = DebugUtil.debugDump(c.asPrismContainerValue());
    System.out.println(s);
    LOGGER.debug("{}", s);
    System.out.println(OBJECT_LIST_SEPARATOR);
    LOGGER.debug(OBJECT_LIST_SEPARATOR);
  }
}

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

public static void logSecurityDeny(MidPointPrincipal midPointPrincipal, Object object, String message) {
  if (LOGGER.isDebugEnabled()) {
    LOGGER.debug("Denied access to {} by {} {}", object, midPointPrincipal, message);
  }
}

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

private static boolean expressionMissing(ExpressionWrapper expressionWrapper, ObjectFilter filter, String shortDesc) {
  if (expressionWrapper == null || expressionWrapper.getExpression() == null) {
    LOGGER.debug("No valueExpression in filter {} in {}. Returning original filter", filter, shortDesc);
    return true;
  }
  return false;
}

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

public static void displayJaxb(String title, Object o, QName defaultElementName) throws SchemaException {
  String serialized = o != null ? PrismTestUtil.serializeAnyData(o, defaultElementName) : "(null)";
  System.out.println(OBJECT_TITLE_OUT_PREFIX + title);
  System.out.println(serialized);
  LOGGER.debug(OBJECT_TITLE_LOG_PREFIX + title + "\n" + serialized);
}

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

@Override
public <T> T runAs(Producer<T> producer, PrismObject<UserType> user) throws SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException {
  LOGGER.debug("Running {} as {}", producer, user);
  Authentication origAuthentication = SecurityContextHolder.getContext().getAuthentication();
  setupPreAuthenticatedSecurityContext(user);
  try {
    return producer.run();
  } finally {
    SecurityContextHolder.getContext().setAuthentication(origAuthentication);
    LOGGER.debug("Finished running {} as {}", producer, user);
  }
}

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

public static void display(String message, PrismContainer<?> propertyContainer) {
  System.out.println(OBJECT_TITLE_OUT_PREFIX + message);
  System.out.println(propertyContainer == null ? "null" : propertyContainer.debugDump());
  LOGGER.debug(OBJECT_TITLE_LOG_PREFIX + message + "\n"
      + (propertyContainer == null ? "null" : propertyContainer.debugDump()));
}

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

public static void display(String title, DebugDumpable dumpable) {
  System.out.println(OBJECT_TITLE_OUT_PREFIX + title);
  System.out.println(dumpable == null ? "null" : dumpable.debugDump(1));
  LOGGER.debug(OBJECT_TITLE_LOG_PREFIX + title  + "\n"
      + (dumpable == null ? "null" : dumpable.debugDump(1)));
}

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

public static <O extends ObjectType> void logDelete(Class<O> type, String oid, OperationResult subResult) {
  if (!LOGGER_OP.isDebugEnabled()) {
    return;
  }
  LOGGER_OP.debug("{}-{} delete {}: {}", PREFIX, type.getSimpleName(), oid, getStatus(subResult));
}

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

private <F extends ObjectType> boolean checkFocusConflicts(LensContext<F> context, Task task, OperationResult result) {
  for (ConflictWatcher watcher : context.getConflictWatchers()) {
    if (repositoryService.hasConflict(watcher, result)) {
      LOGGER.debug("Found modify-modify conflict on {}", watcher);
      return true;
    }
  }
  return false;
}

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

public static void assertExceptionSanity(ObjectAlreadyExistsException e) {
  LOGGER.debug("Exception (expected) {}", e, e);
  System.out.println("Exception (expected)");
  System.out.println(ExceptionUtils.getFullStackTrace(e));
  assert !e.getMessage().isEmpty() : "Empty exception message";
  assert e.getMessage().length() < MAX_EXCEPTION_MESSAGE_LENGTH : "Exception message too long ("
      +e.getMessage().length()+" characters): "+e.getMessage();
}

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

public SchemaDescription loadPrismSchemaFileDescription(File file) throws FileNotFoundException, SchemaException {
  if (!(file.getName().matches(".*\\.xsd$"))){
    LOGGER.trace("Skipping registering {}, because it is not schema definition.", file.getAbsolutePath());
    return null;
  }
  LOGGER.debug("Loading schema from file {}", file);
  SchemaDescription desc = SchemaDescriptionImpl.parseFile(file);
  desc.setPrismSchema(true);
  registerSchemaDescription(desc);
  return desc;
}

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

public void resetOverride() {
  LOGGER.info("Clock override reset");
  this.override = null;
  this.overrideOffset = null;
  if (LOGGER.isDebugEnabled()) {
    LOGGER.debug("Clock current time: {}", currentTimeXMLGregorianCalendar());
  }
}

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

private void executeScriptingAction(ScriptExecutionPolicyActionType action, EvaluatedPolicyRule rule, ModelContext<?> context, Task task, OperationResult parentResult) {
  LOGGER.debug("Executing policy action scripts ({}) in action: {}\non rule:{}",
      action.getExecuteScript().size(), action, rule.debugDumpLazily());
  List<ExecuteScriptType> executeScript = action.getExecuteScript();
  for (ExecuteScriptType executeScriptBean : executeScript) {
    executeScript(action, rule, context, task, parentResult, executeScriptBean);
  }
}

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

@Override
@SuppressWarnings("unchecked")
public String visualize(ResourceType resource, Target target, Task task, OperationResult result)
    throws SchemaException, SecurityViolationException, ObjectNotFoundException, CommunicationException, ConfigurationException {
  LOGGER.debug("Starting data model visualization for {}", ObjectTypeUtil.toShortString(resource));
  DataModel model = new DataModel(prismContext);
  List<PrismObject<ResourceType>> resources = new ArrayList<>();
  resources.add(resource.clone().asPrismObject());
  createDataItems(model, resources);
  processResourceMappings(model, resources);
  return export(model, target);
}

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

public static void triggerConstraintLegacy(EvaluatedPolicyRuleTrigger trigger, Collection<String> policySituations,
    LocalizationService localizationService) throws PolicyViolationException {
  LOGGER.debug("Legacy policy rule triggered: {}", trigger);
  if (LOGGER.isTraceEnabled()) {
    LOGGER.trace("Legacy Policy rule triggered:\n{}", trigger.debugDump(1));
  }
  if (trigger.getConstraint().getEnforcement() == null || trigger.getConstraint().getEnforcement() == PolicyConstraintEnforcementType.ENFORCE) {
    throw localizationService.translate(new PolicyViolationException(trigger.getMessage()));
  }
}

相关文章