本文整理了Java中org.webpieces.util.logging.Logger.debug()
方法的一些代码示例,展示了Logger.debug()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.debug()
方法的具体详情如下:
包路径:org.webpieces.util.logging.Logger
类名称:Logger
方法名:debug
[英]Log a message at the DEBUG level. Usage: log.debug(()->"my lazy log statement")
[中]在调试级别记录消息。用法:日志。调试(()->“我的惰性日志语句”)
代码示例来源:origin: org.webpieces/core-util
public CompletableFuture<RESP> get() {
log.debug(() -> "key:"+key+" start virtual single thread. ");
CompletableFuture<RESP> fut = processor.get();
log.debug(() -> "key:"+key+" halfway there. future needs to be acked to finish work and release virtual thread");
return fut;
}
};
代码示例来源:origin: org.webpieces/core-util
private <RESP> CompletableFuture<RESP> release(RESP v, Throwable e) {
log.debug(() -> "key:"+key+" end virtual single thread");
//immediately release when future is complete
queue.releasePermit();
CompletableFuture<RESP> future = new CompletableFuture<RESP>();
if (e != null) {
future.completeExceptionally(e);
} else
future.complete(v);
return future;
}
代码示例来源:origin: org.webpieces/core-util
public <RESP> CompletableFuture<RESP> runRequest(Supplier<CompletableFuture<RESP>> processor) {
Supplier<CompletableFuture<RESP>> proxy = new Supplier<CompletableFuture<RESP>>() {
public CompletableFuture<RESP> get() {
log.debug(() -> "key:"+key+" start virtual single thread. ");
CompletableFuture<RESP> fut = processor.get();
log.debug(() -> "key:"+key+" halfway there. future needs to be acked to finish work and release virtual thread");
return fut;
}
};
log.debug(() -> "key:"+key+" get virtual thread or wait");
return queue.runRequest(proxy)
.handle((v, e) -> {
return release(v, e);
})
.thenCompose(Function.identity());
}
代码示例来源:origin: org.webpieces/http-router
public void addScopeToCookieIfExist(List<RouterCookie> cookies, CookieScope cookie1) {
if(!(cookie1 instanceof CookieScopeImpl))
throw new IllegalArgumentException("Cookie is not the right data type="+cookie1.getClass()+" needs to be of type "+CookieScopeImpl.class);
CookieScopeImpl data = (CookieScopeImpl) cookie1;
if(data.isNeedCreateSetCookie()) {
log.debug(()->"translating cookie="+cookie1.getName()+" to send to browser");
RouterCookie cookie = translateScopeToCookie(data);
cookies.add(cookie);
} else if(data.isNeedCreateDeleteCookie()) {
log.debug(()->"creating delete cookie for "+cookie1.getName()+" to send to browser");
RouterCookie cookie = createDeleteCookie(data.getName());
cookies.add(cookie);
} else {
log.debug(()->"not sending any cookie to browser for cookie="+cookie1.getName());
}
}
代码示例来源:origin: org.webpieces/core-statemachine
/**
* @param smState
* @param evt
*/
public void fireEvent(StateMachineState smState, Object evt)
{
TransitionImpl transition = evtToTransition.get(evt);
if(transition == null) {
log.debug(() -> smState+"No Transition: "+getName()+" -> <no transition found>, event="+evt);
if(noTransitionListener != null)
noTransitionListener.noTransitionFromEvent(smState.getCurrentState(), evt);
return;
}
State nextState = transition.getEndState();
if(log.isDebugEnabled())
log.debug(() -> smState+"Transition: "+getName()+" -> "+nextState+", event="+evt);
try {
smState.setCurrentState(nextState);
} catch(RuntimeException e) {
log.warn(smState+"Transition FAILED: "+getName()+" -> "+nextState+", event="+evt);
throw e;
}
}
内容来源于网络,如有侵权,请联系作者删除!