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

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

本文整理了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

  1. @Override
  2. public void info(Throwable e) {
  3. try {
  4. logger.info(e);
  5. } catch (Throwable t) {
  6. }
  7. }

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

  1. @Override
  2. public void info(Throwable e) {
  3. try {
  4. logger.info(e);
  5. } catch (Throwable t) {
  6. }
  7. }

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

  1. /**
  2. * close server
  3. */
  4. public void stop() {
  5. logger.info("qos-server stopped.");
  6. if (boss != null) {
  7. boss.shutdownGracefully();
  8. }
  9. if (worker != null) {
  10. worker.shutdownGracefully();
  11. }
  12. }

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

  1. public static void info(Logger logger, String msg, Throwable e) {
  2. if (logger == null) {
  3. return;
  4. }
  5. if (logger.isInfoEnabled()) {
  6. logger.info(msg, e);
  7. }
  8. }

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

  1. @Override
  2. public void info(String msg, Throwable e) {
  3. try {
  4. logger.info(appendContextMessage(msg), e);
  5. } catch (Throwable t) {
  6. }
  7. }

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

  1. /**
  2. * not private. just for unittest.
  3. */
  4. void publishAll() {
  5. logger.info("start to publish all metadata.");
  6. this.doHandleMetadataCollection(allMetadataReports);
  7. }

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

  1. public static void info(Logger logger, String msg) {
  2. if (logger == null) {
  3. return;
  4. }
  5. if (logger.isInfoEnabled()) {
  6. logger.info(msg);
  7. }
  8. }

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

  1. public static void info(Logger logger, Throwable e) {
  2. if (logger == null) {
  3. return;
  4. }
  5. if (logger.isInfoEnabled()) {
  6. logger.info(e);
  7. }
  8. }

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

  1. /**
  2. * not private. just for unittest.
  3. */
  4. void publishAll() {
  5. logger.info("start to publish all metadata.");
  6. this.doHandleMetadataCollection(allMetadataReports);
  7. }

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

  1. public static void info(Logger logger, String msg, Throwable e) {
  2. if (logger == null) {
  3. return;
  4. }
  5. if (logger.isInfoEnabled()) {
  6. logger.info(msg, e);
  7. }
  8. }

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

  1. private void unicast(String msg, String host) {
  2. if (logger.isInfoEnabled()) {
  3. logger.info("Send unicast message: " + msg + " to " + host + ":" + multicastPort);
  4. }
  5. try {
  6. byte[] data = (msg + "\n").getBytes();
  7. DatagramPacket hi = new DatagramPacket(data, data.length, InetAddress.getByName(host), multicastPort);
  8. multicastSocket.send(hi);
  9. } catch (Exception e) {
  10. throw new IllegalStateException(e.getMessage(), e);
  11. }
  12. }

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

  1. private void unicast(String msg, String host) {
  2. if (logger.isInfoEnabled()) {
  3. logger.info("Send unicast message: " + msg + " to " + host + ":" + multicastPort);
  4. }
  5. try {
  6. byte[] data = (msg + "\n").getBytes();
  7. DatagramPacket hi = new DatagramPacket(data, data.length, InetAddress.getByName(host), multicastPort);
  8. multicastSocket.send(hi);
  9. } catch (Exception e) {
  10. throw new IllegalStateException(e.getMessage(), e);
  11. }
  12. }

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

  1. private void multicast(String msg) {
  2. if (logger.isInfoEnabled()) {
  3. logger.info("Send multicast message: " + msg + " to " + multicastAddress + ":" + multicastPort);
  4. }
  5. try {
  6. byte[] data = (msg + "\n").getBytes();
  7. DatagramPacket hi = new DatagramPacket(data, data.length, multicastAddress, multicastPort);
  8. multicastSocket.send(hi);
  9. } catch (Exception e) {
  10. throw new IllegalStateException(e.getMessage(), e);
  11. }
  12. }

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

  1. private void multicast(String msg) {
  2. if (logger.isInfoEnabled()) {
  3. logger.info("Send multicast message: " + msg + " to " + multicastAddress + ":" + multicastPort);
  4. }
  5. try {
  6. byte[] data = (msg + "\n").getBytes();
  7. DatagramPacket hi = new DatagramPacket(data, data.length, multicastAddress, multicastPort);
  8. multicastSocket.send(hi);
  9. } catch (Exception e) {
  10. throw new IllegalStateException(e.getMessage(), e);
  11. }
  12. }

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

  1. void loadProperties() {
  2. if (file != null && file.exists()) {
  3. try (InputStream in = new FileInputStream(file)) {
  4. properties.load(in);
  5. if (logger.isInfoEnabled()) {
  6. logger.info("Load service store file " + file + ", data: " + properties);
  7. }
  8. } catch (Throwable e) {
  9. logger.warn("Failed to load service store file " + file, e);
  10. }
  11. }
  12. }

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

  1. void loadProperties() {
  2. if (file != null && file.exists()) {
  3. try (InputStream in = new FileInputStream(file)) {
  4. properties.load(in);
  5. if (logger.isInfoEnabled()) {
  6. logger.info("Load service store file " + file + ", data: " + properties);
  7. }
  8. } catch (Throwable e) {
  9. logger.warn("Failed to load service store file " + file, e);
  10. }
  11. }
  12. }

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

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

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

  1. @Override
  2. public void run() {
  3. if (logger.isInfoEnabled()) {
  4. logger.info("Run shutdown hook now.");
  5. }
  6. doDestroy();
  7. }

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

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

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

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

相关文章