本文整理了Java中org.granite.logging.Logger.isDebugEnabled()
方法的一些代码示例,展示了Logger.isDebugEnabled()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.isDebugEnabled()
方法的具体详情如下:
包路径:org.granite.logging.Logger
类名称:Logger
方法名:isDebugEnabled
暂无
代码示例来源:origin: org.graniteds/granite-client
public AMF3Deserializer(InputStream in) {
super(in);
debug = log.isDebugEnabled();
debugMore = logMore.isDebugEnabled();
if (debugMore) logMore.debug("new AMF3Deserializer(in=%s)", in);
}
代码示例来源:origin: org.graniteds/granite-server
private String getStackTrace(Throwable t) {
if (!log.isDebugEnabled())
return "";
StringWriter sw = new StringWriter();
t.printStackTrace(new PrintWriter(sw));
return sw.toString().replace("\r\n", "\n").replace('\r', '\n');
}
代码示例来源:origin: org.graniteds/granite-client-javafx
private String getStackTrace(Throwable t) {
if (!log.isDebugEnabled())
return "";
StringWriter sw = new StringWriter();
t.printStackTrace(new PrintWriter(sw));
return sw.toString().replace("\r\n", "\n").replace('\r', '\n');
}
代码示例来源:origin: org.graniteds/granite-client-java
private String getStackTrace(Throwable t) {
if (!log.isDebugEnabled())
return "";
StringWriter sw = new StringWriter();
t.printStackTrace(new PrintWriter(sw));
return sw.toString().replace("\r\n", "\n").replace('\r', '\n');
}
代码示例来源:origin: org.graniteds/granite-client
private String getStackTrace(Throwable t) {
if (!log.isDebugEnabled())
return "";
StringWriter sw = new StringWriter();
t.printStackTrace(new PrintWriter(sw));
return sw.toString().replace("\r\n", "\n").replace('\r', '\n');
}
代码示例来源:origin: org.graniteds/granite-server
private Object mergeArray(ClassGetter classGetter, Object array, Object previous, Object owner, String propertyName) {
if (log.isDebugEnabled())
log.debug("Context mergeArray: " + array + (previous != null ? " previous " + previous.getClass().getName() : ""));
Object key = CacheKey.key(array, owner, propertyName);
int length = Array.getLength(array);
Object prevArray = ArrayUtil.newArray(ArrayUtil.getComponentType(array.getClass()), length);
DataMergeContext.getCache().put(key, prevArray);
for (int i = 0; i < length; i++) {
Object obj = Array.get(array, i);
Array.set(prevArray, i, mergeExternal(classGetter, obj, null, null, null));
}
return prevArray;
}
代码示例来源:origin: org.graniteds/granite-server
private Object mergeMap(ClassGetter classGetter, Map<Object, Object> map, Object previous, Object owner, String propertyName) {
if (log.isDebugEnabled())
log.debug("Context mergeMap: " + map + (previous != null ? " previous " + previous.getClass().getName() : ""));
代码示例来源:origin: org.graniteds/granite-client-java
private void init(Throwable t) {
if (t instanceof ServiceException) {
ServiceException se = (ServiceException)t;
this.faultCode = se.getCode();
this.faultString = se.getMessage();
if (t instanceof SecurityServiceException)
this.faultDetail = se.getDetail();
else
this.faultDetail = se.getDetail() + getStackTrace(t);
this.extendedData = se.getExtendedData();
}
else if (t != null) {
this.faultString = t.getMessage();
this.faultDetail = t.getMessage();
}
if (!(t instanceof SecurityServiceException)) {
for (Throwable root = t; root != null; root = root.getCause())
rootCause = root;
}
if (rootCause != null && !log.isDebugEnabled())
rootCause = ((Throwable)rootCause).getMessage();
}
代码示例来源:origin: org.graniteds/granite-client-javafx
private void init(Throwable t) {
if (t instanceof ServiceException) {
ServiceException se = (ServiceException)t;
this.faultCode = se.getCode();
this.faultString = se.getMessage();
if (t instanceof SecurityServiceException)
this.faultDetail = se.getDetail();
else
this.faultDetail = se.getDetail() + getStackTrace(t);
this.extendedData = se.getExtendedData();
}
else if (t != null) {
this.faultString = t.getMessage();
this.faultDetail = t.getMessage();
}
if (!(t instanceof SecurityServiceException)) {
for (Throwable root = t; root != null; root = root.getCause())
rootCause = root;
}
if (rootCause != null && !log.isDebugEnabled())
rootCause = ((Throwable)rootCause).getMessage();
}
代码示例来源:origin: org.graniteds/granite-server
private void init(Throwable t) {
if (t instanceof ServiceException) {
ServiceException se = (ServiceException)t;
this.faultCode = se.getCode();
this.faultString = se.getMessage();
if (t instanceof SecurityServiceException)
this.faultDetail = se.getDetail();
else
this.faultDetail = se.getDetail() + getStackTrace(t);
this.extendedData = se.getExtendedData();
}
else if (t != null) {
this.faultString = t.getMessage();
this.faultDetail = t.getMessage();
}
if (!(t instanceof SecurityServiceException)) {
for (Throwable root = t; root != null; root = root.getCause())
rootCause = root;
}
if (rootCause != null && !log.isDebugEnabled())
rootCause = ((Throwable)rootCause).getMessage();
}
代码示例来源:origin: org.graniteds/granite-client
private void init(Throwable t) {
if (t instanceof ServiceException) {
ServiceException se = (ServiceException)t;
this.faultCode = se.getCode();
this.faultString = se.getMessage();
if (t instanceof SecurityServiceException)
this.faultDetail = se.getDetail();
else
this.faultDetail = se.getDetail() + getStackTrace(t);
this.extendedData = se.getExtendedData();
}
else if (t != null) {
this.faultString = t.getMessage();
this.faultDetail = t.getMessage();
}
if (!(t instanceof SecurityServiceException)) {
for (Throwable root = t; root != null; root = root.getCause())
rootCause = root;
}
if (rootCause != null && !log.isDebugEnabled())
rootCause = ((Throwable)rootCause).getMessage();
}
代码示例来源:origin: org.graniteds/granite-server
private Object mergeCollection(ClassGetter classGetter, Collection<Object> coll, Object previous, Object owner, String propertyName) {
if (log.isDebugEnabled())
log.debug("Context mergeCollection: " + coll + (previous != null ? " previous " + previous.getClass().getName() : ""));
代码示例来源:origin: org.graniteds/granite-server
public void setRequestResponseKey(RequestResponseKey key) {
if (log.isDebugEnabled())
log.debug("Channel: %s got new asyncContext: %s", getId(), key);
代码示例来源:origin: org.graniteds/granite-server
public void setAsyncContext(AsyncContext asyncContext) {
if (log.isDebugEnabled())
log.debug("Channel: %s got new asyncContext: %s", getId(), asyncContext);
代码示例来源:origin: org.graniteds/granite-server
throw e;
if (log.isDebugEnabled())
log.debug(e, "Could not create JMS Producer (retrying %d time)", retryCount);
else
代码示例来源:origin: org.graniteds/granite-server
throw e;
if (log.isDebugEnabled())
log.debug(e, "Could not create JMS Consumer (retrying %d time)", retryCount);
else
代码示例来源:origin: org.graniteds/granite-server
public void setHttpEvent(HttpEvent event) {
if (log.isDebugEnabled())
log.debug("Channel: %s got new event: %s", getId(), EventUtil.toString(event));
代码示例来源:origin: org.graniteds/granite-server
public void setCometEvent(CometEvent event) {
if (log.isDebugEnabled())
log.debug("Channel: %s got new event: %s", getId(), EventUtil.toString(event));
代码示例来源:origin: org.graniteds/granite-server
public void event(CometEvent event) throws IOException, ServletException {
// make sure we've got a valid CometEvent (should never happen)
if (!EventUtil.isValid(event)) {
log.error("Tomcat sent an invalid CometEvent: %s.%s", event.getEventType(), event.getEventSubType());
return;
}
if (log.isDebugEnabled()) {
log.debug(
"%s.%s: %s/%s",
event.getEventType(), event.getEventSubType(),
event.getHttpServletRequest(), event.getHttpServletResponse()
);
}
if (event.getEventType() == CometEvent.EventType.BEGIN)
begin(event);
else if (event.getEventType() == CometEvent.EventType.READ)
read(event);
else if (event.getEventType() == CometEvent.EventType.END)
end(event);
else if (event.getEventType() == CometEvent.EventType.ERROR)
error(event);
else
throw new ServletException("Unknown CometEvent type: " + event.getEventType());
}
代码示例来源:origin: org.graniteds/granite-server
public void event(HttpEvent event) throws IOException, ServletException {
// make sure we've got a valid CometEvent (should never happen)
if (!EventUtil.isValid(event)) {
log.error("JBossWeb sent an invalid HttpEvent: %s", event.getType());
return;
}
if (log.isDebugEnabled()) {
log.debug(
"%s: %s/%s",
event.getType(),
event.getHttpServletRequest(), event.getHttpServletResponse()
);
}
if (event.getType() == HttpEvent.EventType.BEGIN)
begin(event);
else if (event.getType() == HttpEvent.EventType.READ)
read(event);
else if (event.getType() == HttpEvent.EventType.END)
end(event);
else if (event.getType() == HttpEvent.EventType.ERROR
|| event.getType() == HttpEvent.EventType.EOF
|| event.getType() == HttpEvent.EventType.TIMEOUT)
error(event);
else
throw new ServletException("Unknown HttpEvent type: " + event.getType());
}
内容来源于网络,如有侵权,请联系作者删除!