本文整理了Java中org.ow2.util.log.Log.isDebugEnabled()
方法的一些代码示例,展示了Log.isDebugEnabled()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Log.isDebugEnabled()
方法的具体详情如下:
包路径:org.ow2.util.log.Log
类名称:Log
方法名:isDebugEnabled
[英]Is debug logging currently enabled?
Call this method to prevent having to perform expensive operations (for example, String
concatenation) when the log level is more than debug.
[中]调试日志记录当前是否启用?
调用此方法以防止在日志级别高于调试级别时执行昂贵的操作(例如,String
串联)。
代码示例来源:origin: org.ow2.cmi/cmi-ha
/**
* Obtains a new connection.
* @return the connection
* @throws Exception
*/
private Connection getConnection() throws Exception {
Connection conn;
conn = getDatasource().getConnection();
if (logger.isDebugEnabled()) {
logger.debug("Tx table connection, isolation level: "
+ conn.getTransactionIsolation()
+ " autocommit: " + conn.getAutoCommit());
}
return conn;
}
代码示例来源:origin: org.ow2.easybeans/easybeans-component-jdbcpool
/**
* Free item and return it in the free list.
* @param item The item to be freed
*/
private synchronized void freeItem(final IManagedConnection item) {
// Add it to the free list
// Even if maxage is reached, because we avoids going under min pool
// size.
// PoolKeeper will manage aged connections.
this.freeList.add(item);
if (this.logger.isDebugEnabled()) {
this.logger.debug("item added to freeList: " + item.getIdentifier());
}
// Notify 1 thread waiting for a Connection.
if (this.currentWaiters > 0) {
notify();
}
recomputeBusy();
}
代码示例来源:origin: org.ow2.easybeans/easybeans-jacc-provider
if (logger.isDebugEnabled()) {
logger.debug("Checking permission ''{0}'' with permissions of Principal ''{1}''.", permission, principals[i]
.getName());
if (logger.isDebugEnabled()) {
logger.debug("Permission implied with principal ''{0}''.", principals[i].getName());
代码示例来源:origin: org.ow2.cmi/cmi-ha
/**
* Processes a committing message data.
* @param data the message data
*/
private void processCommittingMessage(final HaMessageData data) {
logger.debug("Processing committing message: " + data);
// Process piggy-backed messages
Iterator<HaMessageData> it = data.getOtherMessages().iterator();
if (logger.isDebugEnabled()) {
if (it.hasNext()) {
logger.debug("Processing piggy backed messages");
}
}
while (it.hasNext()) {
HaMessageData hmd = it.next();
processMessage(hmd);
}
// If there are not entity bean modified process the message
if (data.isReadOnly()) {
messageToBeanInfo(data);
} else {
committingMessages.put(data.getRequestId().getObjectId(), data);
}
}
代码示例来源:origin: org.ow2.util.deploy/deployment-system-impl
if (logger.isDebugEnabled()) {
logger.debug("Context root for War deployable ''{0}'' was found in the EAR "
+ "{1} file, the value is ''{2}''", warDeployable, APPLICATION_XML_ENTRY, ctxRoot);
if (logger.isDebugEnabled()) {
logger.debug("The entry for War deployable ''{0}'' was not found in the EAR "
+ "application.xml file, using a default context-root value ''{1}''", warDeployable, ctxRoot);
代码示例来源:origin: org.ow2.easybeans/easybeans-component-jdbcpool
setMaxWaiters((new Integer(maxwaiters)).intValue());
setSamplingPeriod((new Integer(samplingperiod)).intValue());
if (this.logger.isDebugEnabled()) {
this.logger.debug("ConnectionManager configured with:");
this.logger.debug(" jdbcConnCheckLevel = {0}", connchecklevel);
代码示例来源:origin: org.ow2.cmi/cmi-ha
/**
* Processes the replication messages received. Depending on the message's type
* a concrete process will be performed
*/
public Object handle(final Message message) {
if (logger.isDebugEnabled()) {
logger.debug("-----------------------------------------------");
logger.debug("Processing message: " + message + " in: " + dispatcher.getChannel().getLocalAddress());
}
Object o = message.getObject();
if (o instanceof HaMessageData) {
synchronized (messages) {
messages.add((HaMessageData) o);
// COMPLETE: Check if this should be > 0
if (messages.size() == 1) {
processThread.resumeExecution();
}
}
} else {
logger.debug("\tNo action performed, unknown message format!!!");
}
logger.debug("-----------------------------------------------");
return null;
}
代码示例来源:origin: org.ow2.cmi/cmi-ha
/**
* Correlates the changes made on a modified bean with a concrete client request.
* @param reqId the request id from the client
* @param bean the bean reference
*/
public void addEntityBean(final RequestId reqId, final EntityBeanReference bean) {
if (logger.isDebugEnabled()) {
try {
logger.debug("Adding to request " + reqId + " entity bean: " + bean.getPrimaryKey());
} catch (Exception e) {
}
}
ActiveExecutionObject aeo = activeExecutionObjects.get(reqId);
if (aeo == null) {
logger.debug("\tCreating new ActiveExecutionObject");
aeo = new ActiveExecutionObject(reqId, null, null);
}
Vector<EntityBeanReference> entityBeans = aeo.getEntityBeans();
if (entityBeans == null) {
logger.debug("\tCreating new entity beans vector");
entityBeans = new Vector<EntityBeanReference>();
}
entityBeans.add(bean);
aeo.setEntityBeans(entityBeans);
activeExecutionObjects.put(reqId, aeo);
}
代码示例来源:origin: org.ow2.cmi/cmi-ha
/**
* Process a message an include it info the bean info table.
* @param md the message
*/
private void messageToBeanInfo(final HaMessageData md) {
// Add the beans to backupBeanInfo table
Iterator<BeanInfo> it = md.getBeans().iterator();
if (logger.isDebugEnabled()) {
if (it.hasNext()) {
logger.debug("\tMessage has beans");
} else {
logger.debug("\tMessage don't have beans");
}
}
while (it.hasNext()) {
BeanInfo bi = it.next();
if (bi.getState() != null) {
logger.debug("\tBean added to backupBeanInfo: " + bi.getBId());
backupBeanInfo.put(bi.getBId(), bi);
} else {
logger.debug("\tBean removed from backupBeanInfo: " + bi.getBId());
backupBeanInfo.remove(bi.getBId());
}
}
// Add the response to requestResponse table
backupRequestReponse.put(md.getRequestId(), md.getResponse());
}
代码示例来源:origin: org.ow2.easybeans/easybeans-security
/**
* Checks the security for the given invocation context.
* @param invocationContext the context to check.
* @param runAsBean if true, the bean is a run-as bean.
* @return true if the access has been granted, else false.
*/
public boolean checkSecurity(final EasyBeansInvocationContext invocationContext, final boolean runAsBean) {
PolicyContext.setContextID(getContextId());
// Build Protection Domain with a codesource and array of principal
// Get roles.
Principal[] principals = SecurityCurrent.getCurrent().getSecurityContext().getCallerRoles(runAsBean);
ProtectionDomain protectionDomain = new ProtectionDomain(this.codeSource, null, null, principals);
boolean accessOK = getPolicy().implies(protectionDomain, invocationContextToMethodPermission(invocationContext));
if (this.logger.isDebugEnabled()) {
this.logger.debug("Policy.implies result = {0} ", Boolean.valueOf(accessOK));
}
return accessOK;
}
代码示例来源:origin: org.ow2.cmi/cmi-ha
public void sendMessage(final HaMessageData messageData) {
Message message = new Message(null, null, messageData);
// Compute statistics
messagesNumber++;
messagesSize += message.size();
RspList rspList = dispatcher.castMessage(null, message, GroupRequest.GET_FIRST, 0);
if (logger.isDebugEnabled()) {
Address localAddress = dispatcher.getChannel().getLocalAddress();
logger.debug("Message sended. Length: " + message.getBuffer().length + " From: " + localAddress);
logger.debug("Response: " + rspList.toString());
}
}
代码示例来源:origin: org.ow2.cmi/cmi-ha
synchronized (otherMessages) {
if (otherMessages.size() > 0) {
if (logger.isDebugEnabled()) {
logger.debug("\tPiggy back messages");
for (HaMessageData md : otherMessages) {
代码示例来源:origin: org.ow2.easybeans/easybeans-jacc-provider
if (logger.isDebugEnabled()) {
logger.debug("Check permission");
logger.debug("Excluded permissions = " + excludedPermissions);
内容来源于网络,如有侵权,请联系作者删除!