本文整理汇总了Java中com.evolveum.midpoint.util.logging.Trace.error方法的典型用法代码示例。如果您正苦于以下问题:Java Trace.error方法的具体用法?Java Trace.error怎么用?Java Trace.error使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.evolveum.midpoint.util.logging.Trace
的用法示例。
在下文中一共展示了Trace.error方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: recordFatalError
import com.evolveum.midpoint.util.logging.Trace; //导入方法依赖的package包/类
public static void recordFatalError(Trace logger, OperationResult opResult, String message, Throwable ex) {
if (message == null) {
message = ex.getMessage();
}
logger.error(message, ex);
opResult.recordFatalError(message, ex);
opResult.cleanupResult(ex);
}
示例2: log
import com.evolveum.midpoint.util.logging.Trace; //导入方法依赖的package包/类
@Override
public void log(Class<?> clazz, String method, Level level, String message, Throwable ex) {
Trace LOGGER = TraceManager.getTrace(clazz);
//Mark all messages from ICF as ICF
Marker m = MarkerFactory.getMarker("ICF");
//Translate ICF logging into slf4j
// OK -> trace
// INFO -> debug
// WARN -> warn
// ERROR -> error
if (Level.OK.equals(level)) {
if (null == ex) {
LOGGER.trace(m, "method: {} msg:{}", method, message);
} else {
LOGGER.trace(m, "method: {} msg:{}", new Object[] { method, message }, ex);
}
} else if (Level.INFO.equals(level)) {
if (null == ex) {
LOGGER.debug(m, "method: {} msg:{}", method, message);
} else {
LOGGER.debug(m, "method: {} msg:{}", new Object[] { method, message }, ex);
}
} else if (Level.WARN.equals(level)) {
if (null == ex) {
LOGGER.warn(m, "method: {} msg:{}", method, message);
} else {
LOGGER.warn(m, "method: {} msg:{}", new Object[] { method, message }, ex);
}
} else if (Level.ERROR.equals(level)) {
if (null == ex) {
LOGGER.error(m, "method: {} msg:{}", method, message);
} else {
LOGGER.error(m, "method: {} msg:{}", new Object[] { method, message }, ex);
}
}
}
示例3: logAllLevels
import com.evolveum.midpoint.util.logging.Trace; //导入方法依赖的package包/类
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);
}
示例4: exit
import com.evolveum.midpoint.util.logging.Trace; //导入方法依赖的package包/类
public static <T extends AbstractCache> T exit(ThreadLocal<T> cacheThreadLocal, Trace logger) {
T inst = cacheThreadLocal.get();
logger.trace("Cache: EXIT for thread {}, {}", Thread.currentThread().getName(), inst);
if (inst == null || inst.getEntryCount() == 0) {
logger.error("Cache: Attempt to exit cache that does not exist or has entry count 0: {}", inst);
cacheThreadLocal.set(null);
} else {
inst.decrementEntryCount();
if (inst.getEntryCount() <= 0) {
destroy(cacheThreadLocal, logger);
}
}
return inst;
}
示例5: serializeFaultMessage
import com.evolveum.midpoint.util.logging.Trace; //导入方法依赖的package包/类
public static void serializeFaultMessage(Detail detail, FaultMessage faultMessage, PrismContext prismContext, Trace logger) {
try {
BeanMarshaller marshaller = ((PrismContextImpl) prismContext).getBeanMarshaller();
XNode faultMessageXnode = marshaller.marshall(faultMessage.getFaultInfo()); // TODO
RootXNode xroot = new RootXNode(SchemaConstants.FAULT_MESSAGE_ELEMENT_NAME, faultMessageXnode);
xroot.setExplicitTypeDeclaration(true);
QName faultType = prismContext.getSchemaRegistry().determineTypeForClass(faultMessage.getFaultInfo().getClass());
xroot.setTypeQName(faultType);
((PrismContextImpl) prismContext).getParserDom().serializeUnderElement(xroot, SchemaConstants.FAULT_MESSAGE_ELEMENT_NAME, detail);
} catch (SchemaException e) {
logger.error("Error serializing fault message (SOAP fault detail): {}", e.getMessage(), e);
}
}
示例6: logWarning
import com.evolveum.midpoint.util.logging.Trace; //导入方法依赖的package包/类
public static void logWarning(Trace logger, OperationResult opResult, String message, Exception ex) {
logger.error(message, ex);
opResult.recordWarning(message, ex);
}