當前位置: 首頁>>代碼示例>>Java>>正文


Java Trace.error方法代碼示例

本文整理匯總了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);
}
 
開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:9,代碼來源:ProvisioningUtil.java

示例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);
		}
	}
}
 
開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:38,代碼來源:Slf4jConnectorLogger.java

示例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);
}
 
開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:11,代碼來源:LogfileTestTailer.java

示例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;
}
 
開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:15,代碼來源:AbstractCache.java

示例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);
       }
}
 
開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:14,代碼來源:MiscSchemaUtil.java

示例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);
}
 
開發者ID:Pardus-Engerek,項目名稱:engerek,代碼行數:5,代碼來源:ProvisioningUtil.java


注:本文中的com.evolveum.midpoint.util.logging.Trace.error方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。