本文整理了Java中com.evolveum.midpoint.util.logging.Trace.warn()
方法的一些代码示例,展示了Trace.warn()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Trace.warn()
方法的具体详情如下:
包路径:com.evolveum.midpoint.util.logging.Trace
类名称:Trace
方法名:warn
暂无
代码示例来源:origin: Evolveum/midpoint
@Override
public synchronized void registerListener(SystemConfigurationChangeListener listener) {
if (!listeners.contains(listener)) {
listeners.add(listener);
} else {
LOGGER.warn("Attempt to register already-registered listener: {}", listener);
}
}
代码示例来源:origin: Evolveum/midpoint
@Override
public synchronized void unregisterListener(SystemConfigurationChangeListener listener) {
if (listeners.contains(listener)) {
listeners.remove(listener);
} else {
LOGGER.warn("Attempt to unregister a listener that was not registered: {}", listener);
}
}
}
代码示例来源:origin: Evolveum/midpoint
@Override
public synchronized void registerNotificationListener(ResourceObjectChangeListener listener) {
Validate.notNull(listener);
if (changeListeners.contains(listener)) {
LOGGER.warn(
"Resource object change listener '{}' is already registered. Subsequent registration is ignored",
listener);
} else {
changeListeners.add(listener);
}
}
代码示例来源:origin: Evolveum/midpoint
@Override
public synchronized void registerNotificationListener(ResourceEventListener listener) {
Validate.notNull(listener);
if (eventListeners.contains(listener)) {
LOGGER.warn(
"Resource event listener '{}' is already registered. Subsequent registration is ignored",
listener);
} else {
eventListeners.add(listener);
}
}
代码示例来源:origin: Evolveum/midpoint
@Override
public synchronized void registerNotificationListener(ResourceOperationListener listener) {
Validate.notNull(listener);
if (operationListeners.contains(listener)) {
LOGGER.warn(
"Resource operation listener '{}' is already registered. Subsequent registration is ignored",
listener);
} else {
operationListeners.add(listener);
}
}
@Override
代码示例来源:origin: Evolveum/midpoint
private void recordIcfOperationSuspend(StateReporter reporter, ProvisioningOperation operation, ObjectClassComplexTypeDefinition objectClassDefinition) {
if (reporter != null) {
reporter.recordIcfOperationSuspend(operation, objectClassDefinition);
} else {
LOGGER.warn("Couldn't record ConnId operation suspension as reporter is null.");
}
}
代码示例来源:origin: Evolveum/midpoint
private void recordIcfOperationEnd(StateReporter reporter, ProvisioningOperation operation, ObjectClassComplexTypeDefinition objectClassDefinition, Throwable ex) {
if (reporter != null) {
reporter.recordIcfOperationEnd(operation, objectClassDefinition, ex, null);
} else {
LOGGER.warn("Couldn't record ConnId operation end as reporter is null.");
}
}
代码示例来源:origin: Evolveum/midpoint
public ShadowCheckResult recordWarning(String problemCode, String message) {
if (problemCode != null) {
problemCodes.add(problemCode);
}
LOGGER.warn("{} - for shadow {} on resource {}",
message, ObjectTypeUtil.toShortString(shadow), ObjectTypeUtil.toShortString(resource));
warnings.add(message);
return this;
}
代码示例来源:origin: Evolveum/midpoint
@PostConstruct
public void init() {
if (workflowManager != null) {
workflowManager.registerProcessListener(this);
workflowManager.registerWorkItemListener(this);
} else {
LOGGER.warn("WorkflowManager not present, notifications for workflows will not be enabled.");
}
}
代码示例来源:origin: Evolveum/midpoint
private void recordIcfOperationEnd(StateReporter reporter, ProvisioningOperation operation, ObjectClassComplexTypeDefinition objectClassDefinition, Uid uid) {
if (reporter != null) {
reporter.recordIcfOperationEnd(operation, objectClassDefinition, null, uid==null?null:uid.getUidValue());
} else {
LOGGER.warn("Couldn't record ConnId operation end as reporter is null.");
}
}
代码示例来源:origin: Evolveum/midpoint
private void recordIcfOperationStart(StateReporter reporter, ProvisioningOperation operation, ObjectClassComplexTypeDefinition objectClassDefinition, Uid uid) {
if (reporter != null) {
reporter.recordIcfOperationStart(operation, objectClassDefinition, uid==null?null:uid.getUidValue());
} else {
LOGGER.warn("Couldn't record ConnId operation start as reporter is null.");
}
}
代码示例来源:origin: Evolveum/midpoint
protected void fixProvisioningTypeInDelta(ObjectDelta<O> delta, Objectable object, Task task, OperationResult result) {
if (delta != null && delta.getObjectTypeClass() != null && (ShadowType.class.isAssignableFrom(delta.getObjectTypeClass()) || ResourceType.class.isAssignableFrom(delta.getObjectTypeClass()))) {
try {
lensContext.getProvisioningService().applyDefinition(delta, object, task, result);
} catch (Exception e) {
LOGGER.warn("Error applying provisioning definitions to delta {}: {}", delta, e.getMessage());
// In case of error just go on. Maybe we do not have correct definition here. But at least we can
// display the GUI pages and maybe we can also salvage the operation.
result.recordWarning(e);
}
}
}
代码示例来源:origin: Evolveum/midpoint
private void fixProvisioningTypeInObject(PrismObject<O> object, Task task, OperationResult result) {
if (object != null && object.getCompileTimeClass() != null && (ShadowType.class.isAssignableFrom(object.getCompileTimeClass()) || ResourceType.class.isAssignableFrom(object.getCompileTimeClass()))) {
try {
lensContext.getProvisioningService().applyDefinition(object, task, result);
} catch (Exception e) {
LOGGER.warn("Error applying provisioning definitions to object {}: {}", object, e.getMessage());
// In case of error just go on. Maybe we do not have correct definition here. But at least we can
// display the GUI pages and maybe we can also salvage the operation.
result.recordWarning(e);
}
}
}
代码示例来源:origin: Evolveum/midpoint
@Override
public void updateUser(MidPointPrincipal principal) {
OperationResult result = new OperationResult(OPERATION_UPDATE_USER);
try {
save(principal, result);
} catch (Exception ex) {
LOGGER.warn("Couldn't save user '{}, ({})', reason: {}.", principal.getFullName(), principal.getOid(), ex.getMessage(), ex);
}
}
代码示例来源:origin: Evolveum/midpoint
public void warnOrThrow(Trace logger, String message, Throwable t) throws SchemaException {
if (isCompat()) {
logger.warn("{}", message, t);
warn(message);
} else {
throw new SchemaException(message, t);
}
}
代码示例来源:origin: Evolveum/midpoint
public static void logPreviousResultIfNeeded(Task task, TaskWorkBucketProcessingResult previousRunResult, Trace logger) {
OperationResult previousOpResult = previousRunResult.getOperationResult();
if (previousOpResult != null) {
previousOpResult.computeStatusIfUnknown();
if (!previousOpResult.isSuccess()) {
logger.warn("Last work bucket finished with status other than SUCCESS in {}:\n{}", task, previousOpResult.debugDump());
}
}
}
}
代码示例来源:origin: Evolveum/midpoint
@Override
public void setupPreAuthenticatedSecurityContext(PrismObject<UserType> user) throws SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException {
MidPointPrincipal principal;
if (userProfileService == null) {
LOGGER.warn("No user profile service set up in SecurityEnforcer. "
+ "This is OK in low-level tests but it is a serious problem in running system");
principal = new MidPointPrincipal(user.asObjectable());
} else {
principal = userProfileService.getPrincipal(user);
}
setupPreAuthenticatedSecurityContext(principal);
}
代码示例来源:origin: Evolveum/midpoint
private <F extends FocusType> PrismObject<ShadowType> loadProjection(LensContext<F> context,
LensProjectionContext projContext, Task task, OperationResult result, PrismObject<ShadowType> accountCurrent)
throws SchemaException {
try {
contextLoader.loadFullShadow(context, projContext, "inbound", task, result);
accountCurrent = projContext.getObjectCurrent();
} catch (ObjectNotFoundException | SecurityViolationException | CommunicationException | ConfigurationException | ExpressionEvaluationException e) {
LOGGER.warn("Couldn't load account with shadow OID {} because of {}, setting context as broken and skipping inbound processing on it", projContext.getOid(), e.getMessage());
projContext.setSynchronizationPolicyDecision(SynchronizationPolicyDecision.BROKEN);
}
return accountCurrent;
}
代码示例来源:origin: Evolveum/midpoint
private void logAllLevels(Trace logger, String subsystemName) {
String message = MARKER+" "+subsystemName;
String previousSubsystem = MidpointInterceptor.swapSubsystemMark(subsystemName);
logger.trace(message);
logger.debug(message);
logger.info(message);
logger.warn(message);
logger.error(message);
MidpointInterceptor.swapSubsystemMark(previousSubsystem);
}
代码示例来源:origin: Evolveum/midpoint
public Builder<V, D> addVariableDefinition(ExpressionVariableDefinitionType varDef) throws SchemaException {
if (varDef.getObjectRef() != null) {
ObjectReferenceType ref = varDef.getObjectRef();
ref.setType(getPrismContext().getSchemaRegistry().qualifyTypeName(ref.getType()));
return addVariableDefinition(varDef.getName(), ref);
} else if (varDef.getValue() != null) {
return addVariableDefinition(varDef.getName(),varDef.getValue());
} else {
LOGGER.warn("Empty definition of variable {} in {}, ignoring it", varDef.getName(), getContextDescription());
return this;
}
}
内容来源于网络,如有侵权,请联系作者删除!