本文整理了Java中org.objectweb.util.monolog.api.Logger.isLoggable()
方法的一些代码示例,展示了Logger.isLoggable()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.isLoggable()
方法的具体详情如下:
包路径:org.objectweb.util.monolog.api.Logger
类名称:Logger
方法名:isLoggable
[英]Check if a message of the given level would actually be logged by this logger.
[中]检查此记录器是否实际记录了给定级别的消息。
代码示例来源:origin: org.ow2.joram/joram-mom-core
public synchronized static void removeExecutors() {
if (executorService == null)
return;
if (logger.isLoggable(BasicLevel.DEBUG))
logger.log(BasicLevel.DEBUG, "TcpProxyService.removeExecutors()");
executorService.shutdown();
executorService = null;
}
代码示例来源:origin: org.ow2.joram/joram-mom-core
/**
* Sets a listener.
*
* @param requestId Identifier of the listener request.
*/
void setListener(int requestId) {
this.requestId = requestId;
toListener = true;
if (logger.isLoggable(BasicLevel.DEBUG))
logger.log(BasicLevel.DEBUG, this + ": listener set.");
}
代码示例来源:origin: org.objectweb.joram/joram-mom-core
Message getSubscriptionMessage(String msgId) {
if (logger.isLoggable(BasicLevel.DEBUG))
logger.log(BasicLevel.DEBUG, "ClientSubscription.getSubscriptionMessage(" + msgId + ')');
int index = messageIds.indexOf(msgId);
if (index < 0) {
// The message has been delivered
if (logger.isLoggable(BasicLevel.DEBUG))
logger.log(BasicLevel.DEBUG, " -> message not found");
return null;
}
return (Message) messagesTable.get(msgId);
}
代码示例来源:origin: org.objectweb.joram/joram-mom-core
/**
* Only call in UserAgent creation.
*
* @param prop properties
*/
public void setInterceptors(Properties prop) {
if (logger.isLoggable(BasicLevel.DEBUG))
logger.log(BasicLevel.DEBUG, "--- " + this + " initInterceptors(" + prop + ')');
if (prop == null) return;
interceptors_out = (String) prop.get(AdminCommandConstant.INTERCEPTORS_OUT);
interceptors_in = (String) prop.get(AdminCommandConstant.INTERCEPTORS_IN);
}
代码示例来源:origin: org.objectweb.joram/joram-mom-core
public void push(ProxyMessage msg) {
if (logger.isLoggable(BasicLevel.DEBUG))
logger.log(BasicLevel.DEBUG, "AckedQueue.push(" + msg + ')');
synchronized (list) {
list.addElement(msg);
list.notify();
}
}
代码示例来源:origin: org.objectweb.joram/joram-mom-core
/**
* Overrides this <code>Topic</code> method; if this AdminTopic is on
* server0, new cluster fellow is notified to other fellows and other
* fellows are notified to it.
*/
protected void clusterJoin(ClusterJoinNot not) {
if (logger.isLoggable(BasicLevel.WARN))
logger.log(BasicLevel.WARN, "Unexpected notification: " + not);
}
代码示例来源:origin: org.objectweb.joram/joram-mom-core
/**
* Overrides this <code>Topic</code> method; the forwarded messages
* contain admin requests and will be processed.
*/
protected void topicForwardNot(AgentId from, TopicForwardNot not) {
if (logger.isLoggable(BasicLevel.WARN))
logger.log(BasicLevel.WARN, "Unexpected notification: " + not);
}
代码示例来源:origin: org.objectweb.joram/joram-mom-core
/** Adds a pending delivery. */
void addPendingDelivery(AbstractJmsReply reply) {
if (logger.isLoggable(BasicLevel.DEBUG))
logger.log(BasicLevel.DEBUG,
"ClientContext[" + proxyId + ',' + id + "].addPendingDelivery(" + reply + ')');
repliesBuffer.add(reply);
}
代码示例来源:origin: org.ow2.joram/joram-mom-core
public void processMessage(Message fullMessage) throws Exception {
if (logger.isLoggable(BasicLevel.DEBUG)) {
logger.log(BasicLevel.DEBUG, "DistributionModule.processMessage(" + fullMessage.id + ") isAsyncDistribution = " + isAsyncDistribution);
}
if (!isAsyncDistribution) {
distributionHandler.distribute(fullMessage);
} else {
// the message are send by distributionDaemon.
throw new Exception("async distribution is on.");
}
}
代码示例来源:origin: org.ow2.joram/joram-mom-core
protected void close() {
if (logger.isLoggable(BasicLevel.DEBUG))
logger.log(BasicLevel.DEBUG,
"TcpWriter.close()", new Exception());
if (ioctrl != null)
ioctrl.close();
ioctrl = null;
}
}
代码示例来源:origin: org.ow2.joram/joram-mom-core
/** @see DistributionHandler#init(Properties) */
public void init(Properties properties, boolean firstTime) {
remoteDestinationID = AgentId.fromString(properties.getProperty("remoteAgentID"));
if (logger.isLoggable(BasicLevel.INFO))
logger.log(BasicLevel.INFO, "--- " + this + " notification distribution handler bind to destination ("
+ remoteDestinationID + ")");
}
代码示例来源:origin: org.objectweb.joram/joram-mom-core
/**
* Sends a notification to the specified agent.
*
* @param to the identifier of the recipient agent
* @param not the notification to send
*/
public void sendNot(AgentId to, Notification not) {
if (logger.isLoggable(BasicLevel.DEBUG))
logger.log(BasicLevel.DEBUG, "UserAgent.sendNot(" + to + ',' + not + ')');
sendTo(to, not);
}
代码示例来源:origin: org.objectweb.joram/joram-mom-core
public void setNoSave() {
if (logger.isLoggable(BasicLevel.DEBUG))
logger.log(BasicLevel.DEBUG, "setNoSave()");
super.setNoSave();
}
代码示例来源:origin: org.objectweb.joram/joram-mom-core
protected void close() {
if (logger.isLoggable(BasicLevel.DEBUG))
logger.log(BasicLevel.DEBUG, "TcpReader.close()");
if (ioctrl != null)
ioctrl.close();
ioctrl = null;
}
}
代码示例来源:origin: org.ow2.joram/joram-mom-core
public static Message load(String txname) throws IOException, ClassNotFoundException {
if (logger.isLoggable(BasicLevel.DEBUG))
logger.log(BasicLevel.DEBUG, "Message.load:" + txname);
Message msg = (Message) AgentServer.getTransaction().load(txname);
msg.txname = txname;
return msg;
}
代码示例来源:origin: org.ow2.joram/joram-mom-core
public void save() throws IOException {
if (logger.isLoggable(BasicLevel.DEBUG))
logger.log(BasicLevel.DEBUG, "QueueDeliveryTable.save() " + modified);
if (modified) {
// Calls 'save' and not 'saveByteArray' in order to enable lazy encoding
// (and potentially 'delete') when reactions are grouped.
AgentServer.getTransaction().save(this, txName);
modified = false;
}
}
代码示例来源:origin: org.objectweb.joram/joram-mom-core
public ClientMessages acquisitionNot(AcquisitionNot not, long msgCount) {
if (logger.isLoggable(BasicLevel.DEBUG)) {
logger.log(BasicLevel.DEBUG, "AcquisitionModule.acquisitionNot(" + not + ")");
}
ClientMessages acquiredCM = not.getAcquiredMessages();
List messages = acquiredCM.getMessages();
if (messages.size() == 0) {
return null;
}
setMessagesInfo(messages, msgCount);
return acquiredCM;
}
代码示例来源:origin: org.ow2.joram/joram-mom-core
protected void start() {
if (logger.isLoggable(BasicLevel.DEBUG))
logger.log(BasicLevel.DEBUG, "TcpProxyService.start()");
ConnectionManager.getCurrentInstance().addManager(this);
activate();
}
代码示例来源:origin: org.ow2.joram/joram-mom-core
public void delete() {
if (logger.isLoggable(BasicLevel.DEBUG))
logger.log(BasicLevel.DEBUG, "Message.delete:" + txname);
if (!isPersistent()) return;
AgentServer.getTransaction().delete(txname);
if (soft) {
AgentServer.getTransaction().delete(txname + "B");
}
}
代码示例来源:origin: org.objectweb.joram/joram-mom-core
public void delete() {
if (logger.isLoggable(BasicLevel.DEBUG))
logger.log(BasicLevel.DEBUG, "Message.delete:" + txname);
if (!isPersistent())
return;
AgentServer.getTransaction().delete(txname);
if (soft) {
AgentServer.getTransaction().delete(txname + "B");
}
}
内容来源于网络,如有侵权,请联系作者删除!