本文整理了Java中org.objectweb.util.monolog.api.Logger.log()
方法的一些代码示例,展示了Logger.log()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.log()
方法的具体详情如下:
包路径:org.objectweb.util.monolog.api.Logger
类名称:Logger
方法名:log
[英]Log a message, with no arguments. If the logger is currently enabled for the given message level then the given message is treated
[中]记录消息,不带参数。如果记录器当前针对给定消息级别启用,则会处理给定消息
代码示例来源:origin: org.ow2.jonas/jonas-naming
/**
* Remove the given {@link JComponentContextFactoryDelegate} from this
* NamingManager instance.
* @param extension Removed delegate
* @throws NamingException if delegate is not removed
*/
public synchronized void removeDelegate(final JComponentContextFactoryDelegate extension) throws NamingException {
logger.log(BasicLevel.DEBUG, "extension:" + extension);
delegates.remove(extension);
extension.undo(sharedCompContext);
}
代码示例来源: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
private boolean isAsyncDistribution(Properties properties) {
if (properties.containsKey(DestinationConstants.ASYNC_DISTRIBUTION_OPTION)) {
try {
return ConversionHelper.toBoolean(properties.get(DestinationConstants.ASYNC_DISTRIBUTION_OPTION));
} catch (MessageValueException exc) {
logger.log(BasicLevel.ERROR, "DistributionQueue: can't parse DaemonDistribution option.", exc);
}
}
return false;
}
代码示例来源: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
/**
* 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.jonas/jonas-naming
/**
* Remove the ComponentContext associated with the given classloader.
* @param cl the classloader which is bind to the context.
*/
public void unSetComponentContext(ClassLoader cl) {
if (Log.isDebugNaming()) {
logger.log(BasicLevel.DEBUG, "class loader = " + cl);
}
clBindings.remove(cl);
}
代码示例来源:origin: org.objectweb.jonas/jonas-naming
/**
* Add the given {@link JComponentContextFactoryDelegate} to this
* NamingManager instance.
* @param extension Added delegate
* @throws NamingException if delegate is not added
*/
public synchronized void addDelegate(final JComponentContextFactoryDelegate extension) throws NamingException {
logger.log(BasicLevel.DEBUG, "add :" + extension);
delegates.add(extension);
extension.modify(sharedCompContext);
}
代码示例来源:origin: org.objectweb.jonas/jonas-naming
/**
* Remove the given {@link JComponentContextFactoryDelegate} from this
* NamingManager instance.
* @param extension Removed delegate
* @throws NamingException if delegate is not removed
*/
public synchronized void removeDelegate(final JComponentContextFactoryDelegate extension) throws NamingException {
logger.log(BasicLevel.DEBUG, "extension:" + extension);
delegates.remove(extension);
extension.undo(sharedCompContext);
}
代码示例来源: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
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
/** Finalizes the agent before it is garbaged. */
public void agentFinalize(boolean lastTime) {
if (cleaningTask != null)
cleaningTask.cancel();
try {
MXWrapper.unregisterMBean(getMBeanName().toString());
} catch (Exception exc) {
logger.log(BasicLevel.DEBUG, this + " jmx failed", exc);
}
super.agentFinalize(lastTime);
}
代码示例来源: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");
}
}
内容来源于网络,如有侵权,请联系作者删除!