本文整理了Java中org.apache.dubbo.common.logger.Logger.isInfoEnabled()
方法的一些代码示例,展示了Logger.isInfoEnabled()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.isInfoEnabled()
方法的具体详情如下:
包路径:org.apache.dubbo.common.logger.Logger
类名称:Logger
方法名:isInfoEnabled
[英]Is info logging currently enabled?
[中]当前是否启用了信息日志记录?
代码示例来源:origin: apache/incubator-dubbo
@Override
public boolean isInfoEnabled() {
try {
return logger.isInfoEnabled();
} catch (Throwable t) {
return false;
}
}
代码示例来源:origin: apache/incubator-dubbo
@Override
public boolean isInfoEnabled() {
try {
return logger.isInfoEnabled();
} catch (Throwable t) {
return false;
}
}
代码示例来源:origin: apache/incubator-dubbo
@Override
public boolean isInfoEnabled() {
return logger.isInfoEnabled();
}
代码示例来源: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
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
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 register(URL url) {
if (url == null) {
throw new IllegalArgumentException("register url == null");
}
if (logger.isInfoEnabled()) {
logger.info("Register: " + url);
}
registered.add(url);
}
代码示例来源:origin: apache/incubator-dubbo
@Override
public void register(URL url) {
if (url == null) {
throw new IllegalArgumentException("register url == null");
}
if (logger.isInfoEnabled()) {
logger.info("Register: " + url);
}
registered.add(url);
}
代码示例来源:origin: apache/incubator-dubbo
@Override
public void unregister(URL url) {
if (url == null) {
throw new IllegalArgumentException("unregister url == null");
}
if (logger.isInfoEnabled()) {
logger.info("Unregister: " + url);
}
registered.remove(url);
}
代码示例来源: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 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
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 void run() {
if (logger.isInfoEnabled()) {
logger.info("Run shutdown hook now.");
}
doDestroy();
}
代码示例来源:origin: apache/incubator-dubbo
@Override
public void run() {
if (logger.isInfoEnabled()) {
logger.info("Run shutdown hook now.");
}
doDestroy();
}
代码示例来源: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);
}
代码示例来源: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);
}
内容来源于网络,如有侵权,请联系作者删除!