本文整理了Java中net.spy.memcached.compat.log.Logger.warn()
方法的一些代码示例,展示了Logger.warn()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.warn()
方法的具体详情如下:
包路径:net.spy.memcached.compat.log.Logger
类名称:Logger
方法名:warn
[英]Log a message at warning level.
[中]以警告级别记录消息。
代码示例来源:origin: com.couchbase.client/couchbase-client
@Override
public void failed(Exception ex) {
getLogger().warn("Cluster Response failed with: ", ex);
latch.countDown();
}
代码示例来源:origin: net.spy/spymemcached
/**
* Validate an opaque value from the header. This may be overridden from a
* subclass where the opaque isn't expected to always be the same as the
* request opaque.
*/
protected boolean opaqueIsValid() {
if (responseOpaque != opaque) {
getLogger().warn("Expected opaque: %d, got opaque: %d\n",
responseOpaque, opaque);
}
return responseOpaque == opaque;
}
代码示例来源:origin: net.spy/spymemcached
@Override
public void run() {
try {
listener.onComplete(future);
} catch(Throwable t) {
getLogger().warn(
"Exception thrown wile executing " + listener.getClass().getName()
+ ".operationComplete()", t);
}
}
});
代码示例来源:origin: com.google.code.simple-spring-memcached/spymemcached
/**
* Validate an opaque value from the header. This may be overridden from a
* subclass where the opaque isn't expected to always be the same as the
* request opaque.
*/
protected boolean opaqueIsValid() {
if (responseOpaque != opaque) {
getLogger().warn("Expected opaque: %d, got opaque: %d\n",
responseOpaque, opaque);
}
return responseOpaque == opaque;
}
代码示例来源:origin: com.amazonaws/elasticache-java-cluster-client
private void trackPollingError(){
pollingErrorCount++;
getLogger().warn("Number of consecutive poller errors is " + Long.toString(pollingErrorCount) +
". Number of minutes since the last successful polling is " + Long.toString(date.getTime() - lastSuccessfulPoll));
}
代码示例来源:origin: com.amazonaws/elasticache-java-cluster-client
@Override
public void run() {
try {
listener.onComplete(future);
} catch(Throwable t) {
getLogger().warn(
"Exception thrown wile executing " + listener.getClass().getName()
+ ".operationComplete()", t);
}
}
});
代码示例来源:origin: com.google.code.maven-play-plugin.spy/memcached
@SuppressWarnings("synthetic-access")
public void receivedStatus(OperationStatus status) {
if(!status.isSuccess()) {
getLogger().warn("Unsuccessful get: %s", status);
}
}
public void gotData(String k, int flags, byte[] data) {
代码示例来源:origin: net.spy/spymemcached
private void interruptOldAuth(MemcachedNode nodeToStop) {
AuthThread toStop = nodeMap.get(nodeToStop);
if (toStop != null) {
if (toStop.isAlive()) {
getLogger().warn(
"Incomplete authentication interrupted for node " + nodeToStop);
toStop.interrupt();
}
nodeMap.remove(nodeToStop);
}
}
代码示例来源:origin: com.google.code.simple-spring-memcached/spymemcached
private void interruptOldAuth(MemcachedNode nodeToStop) {
AuthThread toStop = nodeMap.get(nodeToStop);
if (toStop != null) {
if (toStop.isAlive()) {
getLogger().warn(
"Incomplete authentication interrupted for node " + nodeToStop);
toStop.interrupt();
}
nodeMap.remove(nodeToStop);
}
}
}
代码示例来源:origin: net.spy/spymemcached
public Map<String, T> getSome(long to, TimeUnit unit)
throws InterruptedException, ExecutionException {
Collection<Operation> timedoutOps = new HashSet<Operation>();
Map<String, T> ret = internalGet(to, unit, timedoutOps);
if (timedoutOps.size() > 0) {
timeout = true;
LoggerFactory.getLogger(getClass()).warn(
new CheckedOperationTimeoutException("Operation timed out: ",
timedoutOps).getMessage());
}
return ret;
}
代码示例来源:origin: com.google.code.simple-spring-memcached/spymemcached
public Map<String, T> getSome(long to, TimeUnit unit)
throws InterruptedException, ExecutionException {
Collection<Operation> timedoutOps = new HashSet<Operation>();
Map<String, T> ret = internalGet(to, unit, timedoutOps);
if (timedoutOps.size() > 0) {
timeout = true;
LoggerFactory.getLogger(getClass()).warn(
new CheckedOperationTimeoutException("Operation timed out: ",
timedoutOps).getMessage());
}
return ret;
}
代码示例来源:origin: com.couchbase.client/couchbase-client
@Override
public void operationComplete(ChannelFuture cf) throws Exception {
if(cf.isSuccess()) {
channel = cf.getChannel();
} else {
LOGGER.warn("Could not start monitor channel because of: ",
cf.getCause());
}
channelLatch.countDown();
}
});
代码示例来源:origin: net.spy/spymemcached
@Override
public void receivedStatus(OperationStatus status) {
if(status.isSuccess()) {
supportedMechs.set(status.getMessage());
getLogger().debug("Received SASL supported mechs: "
+ status.getMessage());
} else {
getLogger().warn("Received non-success response for SASL mechs: "
+ status);
}
}
代码示例来源:origin: com.couchbase.client/couchbase-client
@Override
public void setConfig(final String config) {
try {
setConfig(configurationParser.parseBucket(config));
} catch (Exception ex) {
getLogger().warn("Got new config to update, but could not decode it. "
+ "Staying with old one.", ex);
}
}
代码示例来源:origin: com.couchbase.client/couchbase-client
private void logRunException(Exception e) {
if (shutDown) {
// There are a couple types of errors that occur during the
// shutdown sequence that are considered OK. Log at debug.
getLogger().debug("Exception occurred during shutdown", e);
} else {
getLogger().warn("Problem handling Couchbase IO", e);
}
}
代码示例来源:origin: com.google.code.simple-spring-memcached/spymemcached
private void logRunException(Exception e) {
if (shutDown) {
// There are a couple types of errors that occur during the
// shutdown sequence that are considered OK. Log at debug.
getLogger().debug("Exception occurred during shutdown", e);
} else {
getLogger().warn("Problem handling memcached IO", e);
}
}
}
代码示例来源:origin: com.amazonaws/elasticache-java-cluster-client
@Override
public void receivedStatus(OperationStatus status) {
if(status.isSuccess()) {
supportedMechs.set(status.getMessage());
getLogger().debug("Received SASL supported mechs: "
+ status.getMessage());
} else {
getLogger().warn("Received non-success response for SASL mechs: "
+ status);
}
}
代码示例来源:origin: com.couchbase.client/couchbase-client
private void logRunException(Exception e) {
if (shutDown) {
// There are a couple types of errors that occur during the
// shutdown sequence that are considered OK. Log at debug.
getLogger().debug("Exception occurred during shutdown", e);
} else {
getLogger().warn("Problem handling Couchbase IO", e);
}
}
代码示例来源:origin: com.google.code.maven-play-plugin.spy/spymemcached
private void logRunException(Exception e) {
if(shuttingDown) {
// There are a couple types of errors that occur during the
// shutdown sequence that are considered OK. Log at debug.
getLogger().debug("Exception occurred during shutdown", e);
} else {
getLogger().warn("Problem handling memcached IO", e);
}
}
代码示例来源:origin: com.couchbase.client/couchbase-client
@Override
public void updateBucket(final String config) {
try {
updateBucket(getBucket(), configurationParser.parseBucket(config));
} catch (Exception ex) {
getLogger().warn("Got new config to update, but could not decode it. "
+ "Staying with old one.", ex);
getLogger().debug("Problematic config is:" + config);
}
}
内容来源于网络,如有侵权,请联系作者删除!