org.objectweb.util.monolog.api.Logger类的使用及代码示例

x33g5p2x  于2022-01-23 转载在 其他  
字(6.7k)|赞(0)|评价(0)|浏览(87)

本文整理了Java中org.objectweb.util.monolog.api.Logger类的一些代码示例,展示了Logger类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger类的具体详情如下:
包路径:org.objectweb.util.monolog.api.Logger
类名称:Logger

Logger介绍

[英]A Logger implementation receives event messages from an object and exports them. Each Logger is associated with a log level and discards log requests that are below this level. Furthermore the Logger interface extends the Handler interface and represents therefore a type of output.
[中]记录器实现从对象接收事件消息并将其导出。每个记录器都与一个日志级别相关联,并丢弃低于此级别的日志请求。此外,记录器接口扩展了处理程序接口,因此表示一种输出类型。

代码示例

代码示例来源: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.jonas/jonas-log

/**
 * @return the topics list. Assumes that all Loggers are TopicalLoggers.
 */
public String[] getTopics() {
  Logger[] logs = Log.getLoggerFactory().getLoggers();
  // put names in alphabetical order
  TreeSet tset = new TreeSet();
  for (int i = 0; i < logs.length; i++) {
    tset.add(logs[i].getName());
  }
  return (String[]) tset.toArray(new String[0]);
}

代码示例来源: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.ow2.joram/a3-rt

/**
 * Sets the next ack to send.
 */
public synchronized void setAck(Message ack) {
 if (logmon.isLoggable(BasicLevel.DEBUG))
  logmon.log(BasicLevel.DEBUG, ", set ack (" + ack + ')');
 this.ack = ack;
}

代码示例来源:origin: org.ow2.petals.dsb/dsb-removed

/**
 * {@inheritDoc}
 */
public void warning(Object message) {
  if ((this.log != null) && this.log.isLoggable(BasicLevel.WARN)) {
    this.log.log(BasicLevel.LEVEL_WARN, this.name + message);
  }
}

代码示例来源:origin: org.ow2.petals.dsb/dsb-removed

/**
 * {@inheritDoc}
 */
public void error(Object message) {
  if ((this.log != null) && this.log.isLoggable(BasicLevel.ERROR)) {
    this.log.log(BasicLevel.LEVEL_ERROR, this.name + message);
  }
}

代码示例来源:origin: org.ow2.joram/joram-client-jca

/**
 * Constructs an <code>OutboundProducer</code> instance.
 *
 * @param producer  The JMS producer to wrap.
 * @param session   The OutboundSession this producer belongs to.
 */
OutboundProducer(MessageProducer producer, OutboundSession session) {
 if (logger.isLoggable(BasicLevel.DEBUG))
  logger.log(BasicLevel.DEBUG, "OutboundProducer(" + producer + ", " + session + ")");
 this.producer = producer;
 this.session = session;
}

代码示例来源:origin: org.objectweb.joram/a3-rt

public byte[] getState() {
 if (logmon.isLoggable(BasicLevel.DEBUG))
  logmon.log(BasicLevel.DEBUG,"=== MessageListener getState");
 return null;
}

代码示例来源:origin: org.ow2.joram/joram-client-jca

/**
 * Constructs an <code>OutboundPublisher</code> instance.
 *
 * @param producer  The JMS producer to wrap.
 * @param session   The OutboundSession the publisher belongs to.
 */
OutboundPublisher(MessageProducer producer, OutboundSession session) {
 super(producer, session);
 if (logger.isLoggable(BasicLevel.DEBUG))
  logger.log(BasicLevel.DEBUG, "OutboundPublisher(" + producer + ", " + session + ")");
}

代码示例来源:origin: org.objectweb.jonas/jonas-ejb-container

/**
 * constructor
 * @param dd The Session Deployment Decriptor
 * @param bf The Session Factory
 */
public JServiceEndpointHome(SessionStatelessDesc dd, JStatelessFactory bf) {
  if (logger.isLoggable(BasicLevel.DEBUG)) {
    logger.log(BasicLevel.DEBUG, "");
  }
  this.dd = dd;
  this.bf = bf;
}

代码示例来源:origin: org.objectweb.joram/joram-client-jca

/**
 * Constructs a <code>ManagedConnectionMetaDataImpl</code> instance.
 */
public ManagedConnectionMetaDataImpl(String userName) {
 if (AdapterTracing.dbgAdapter.isLoggable(BasicLevel.DEBUG))
  AdapterTracing.dbgAdapter.log(BasicLevel.DEBUG, "ManagedConnectionMetaDataImpl(" + userName + ")");
 this.userName = userName;
}

代码示例来源:origin: org.ow2.joram/jndi-server

public JndiRequest getRequest() {
 if (Trace.logger.isLoggable(BasicLevel.DEBUG))
  Trace.logger.log(BasicLevel.DEBUG, "TcpRequestContext.getRequest()"); 
 return request;
}

代码示例来源:origin: org.objectweb.petals/petals-kernel

/**
 * if log is enabled, Log as warning the message
 *
 * @param msg
 */
public void warning(Object message) {
  if (log != null && log.isLoggable(BasicLevel.WARN)) {
    log.log(BasicLevel.LEVEL_WARN, name+message);
  }
}

代码示例来源:origin: org.objectweb.petals/petals-kernel

/**
 * if log is enabled, Log as warning the exception
 *
 * @param msg
 * @param throwable
 */
public void warning(Object message, Throwable throwable) {
  if (log != null && log.isLoggable(BasicLevel.WARN)) {
    log.log(BasicLevel.LEVEL_WARN, name+message, throwable);
  }
}

代码示例来源: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.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

/** 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-client-jms

public void run() {
  if (logger.isLoggable(BasicLevel.DEBUG))
   logger.log(BasicLevel.DEBUG, "AckTimerTask.run()");
  try {
   doSend(-1, inputCounter, null);
   cancel();
  } catch (IOException exc) {
   if (logger.isLoggable(BasicLevel.DEBUG))
    logger.log(BasicLevel.DEBUG, "", exc);
  }
 }
}

代码示例来源:origin: org.ow2.petals.dsb/dsb-removed

/**
 * {@inheritDoc}
 */
public void info(Object message) {
  if ((this.log != null) && this.log.isLoggable(BasicLevel.INFO)) {
    if (this.log.isLoggable(BasicLevel.DEBUG)) {
      this.log.log(BasicLevel.LEVEL_INFO, this.name + classAndMethod() + " " + message);
    } else {
      this.log.log(BasicLevel.LEVEL_INFO, this.name + message);
    }
  }
}

相关文章