org.apache.dubbo.common.logger.Logger.info()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(5.4k)|赞(0)|评价(0)|浏览(187)

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

Logger.info介绍

[英]Logs a message with info log level.
[中]使用信息日志级别记录消息。

代码示例

代码示例来源:origin: apache/incubator-dubbo

@Override
public void info(Throwable e) {
  try {
    logger.info(e);
  } catch (Throwable t) {
  }
}

代码示例来源:origin: apache/incubator-dubbo

@Override
public void info(Throwable e) {
  try {
    logger.info(e);
  } catch (Throwable t) {
  }
}

代码示例来源:origin: apache/incubator-dubbo

/**
 * close server
 */
public void stop() {
  logger.info("qos-server stopped.");
  if (boss != null) {
    boss.shutdownGracefully();
  }
  if (worker != null) {
    worker.shutdownGracefully();
  }
}

代码示例来源:origin: apache/incubator-dubbo

public static void info(Logger logger, String msg, Throwable e) {
  if (logger == null) {
    return;
  }
  if (logger.isInfoEnabled()) {
    logger.info(msg, e);
  }
}

代码示例来源:origin: apache/incubator-dubbo

@Override
public void info(String msg, Throwable e) {
  try {
    logger.info(appendContextMessage(msg), e);
  } catch (Throwable t) {
  }
}

代码示例来源:origin: apache/incubator-dubbo

/**
 * not private. just for unittest.
 */
void publishAll() {
  logger.info("start to publish all metadata.");
  this.doHandleMetadataCollection(allMetadataReports);
}

代码示例来源:origin: apache/incubator-dubbo

public static void info(Logger logger, String msg) {
  if (logger == null) {
    return;
  }
  if (logger.isInfoEnabled()) {
    logger.info(msg);
  }
}

代码示例来源:origin: apache/incubator-dubbo

public static void info(Logger logger, Throwable e) {
  if (logger == null) {
    return;
  }
  if (logger.isInfoEnabled()) {
    logger.info(e);
  }
}

代码示例来源:origin: apache/incubator-dubbo

/**
 * not private. just for unittest.
 */
void publishAll() {
  logger.info("start to publish all metadata.");
  this.doHandleMetadataCollection(allMetadataReports);
}

代码示例来源:origin: apache/incubator-dubbo

public static void info(Logger logger, String msg, Throwable e) {
  if (logger == null) {
    return;
  }
  if (logger.isInfoEnabled()) {
    logger.info(msg, e);
  }
}

代码示例来源:origin: apache/incubator-dubbo

private void unicast(String msg, String host) {
  if (logger.isInfoEnabled()) {
    logger.info("Send unicast message: " + msg + " to " + host + ":" + multicastPort);
  }
  try {
    byte[] data = (msg + "\n").getBytes();
    DatagramPacket hi = new DatagramPacket(data, data.length, InetAddress.getByName(host), multicastPort);
    multicastSocket.send(hi);
  } catch (Exception e) {
    throw new IllegalStateException(e.getMessage(), e);
  }
}

代码示例来源:origin: apache/incubator-dubbo

private void unicast(String msg, String host) {
  if (logger.isInfoEnabled()) {
    logger.info("Send unicast message: " + msg + " to " + host + ":" + multicastPort);
  }
  try {
    byte[] data = (msg + "\n").getBytes();
    DatagramPacket hi = new DatagramPacket(data, data.length, InetAddress.getByName(host), multicastPort);
    multicastSocket.send(hi);
  } catch (Exception e) {
    throw new IllegalStateException(e.getMessage(), e);
  }
}

代码示例来源:origin: apache/incubator-dubbo

private void multicast(String msg) {
  if (logger.isInfoEnabled()) {
    logger.info("Send multicast message: " + msg + " to " + multicastAddress + ":" + multicastPort);
  }
  try {
    byte[] data = (msg + "\n").getBytes();
    DatagramPacket hi = new DatagramPacket(data, data.length, multicastAddress, multicastPort);
    multicastSocket.send(hi);
  } catch (Exception e) {
    throw new IllegalStateException(e.getMessage(), e);
  }
}

代码示例来源:origin: apache/incubator-dubbo

private void multicast(String msg) {
  if (logger.isInfoEnabled()) {
    logger.info("Send multicast message: " + msg + " to " + multicastAddress + ":" + multicastPort);
  }
  try {
    byte[] data = (msg + "\n").getBytes();
    DatagramPacket hi = new DatagramPacket(data, data.length, multicastAddress, multicastPort);
    multicastSocket.send(hi);
  } catch (Exception e) {
    throw new IllegalStateException(e.getMessage(), e);
  }
}

代码示例来源:origin: apache/incubator-dubbo

void loadProperties() {
  if (file != null && file.exists()) {
    try (InputStream in = new FileInputStream(file)) {
      properties.load(in);
      if (logger.isInfoEnabled()) {
        logger.info("Load service store file " + file + ", data: " + properties);
      }
    } catch (Throwable e) {
      logger.warn("Failed to load service store file " + file, e);
    }
  }
}

代码示例来源:origin: apache/incubator-dubbo

void loadProperties() {
  if (file != null && file.exists()) {
    try (InputStream in = new FileInputStream(file)) {
      properties.load(in);
      if (logger.isInfoEnabled()) {
        logger.info("Load service store file " + file + ", data: " + properties);
      }
    } catch (Throwable e) {
      logger.warn("Failed to load service store file " + file, e);
    }
  }
}

代码示例来源:origin: apache/incubator-dubbo

@Override
public Object aroundReadFrom(ReaderInterceptorContext context) throws IOException, WebApplicationException {
  byte[] buffer = IOUtils.toByteArray(context.getInputStream());
  logger.info("The contents of request body is: \n" + new String(buffer, "UTF-8") + "\n");
  context.setInputStream(new ByteArrayInputStream(buffer));
  return context.proceed();
}

代码示例来源:origin: apache/incubator-dubbo

@Override
public void run() {
  if (logger.isInfoEnabled()) {
    logger.info("Run shutdown hook now.");
  }
  doDestroy();
}

代码示例来源:origin: apache/incubator-dubbo

protected void checkMonitor() {
  createMonitorIfAbsent();
  if (!monitor.isValid()) {
    logger.info("There's no valid monitor config found, if you want to open monitor statistics for Dubbo, " +
        "please make sure your monitor is configured properly.");
  }
}

代码示例来源:origin: apache/incubator-dubbo

@Override
public void disconnected(Channel channel) throws RemotingException {
  if (logger.isInfoEnabled()) {
    logger.info("disconnected from " + channel.getRemoteAddress() + ",url:" + channel.getUrl());
  }
  invoke(channel, Constants.ON_DISCONNECT_KEY);
}

相关文章