本文整理了Java中com.metamx.common.logger.Logger.debug()
方法的一些代码示例,展示了Logger.debug()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.debug()
方法的具体详情如下:
包路径:com.metamx.common.logger.Logger
类名称:Logger
方法名:debug
暂无
代码示例来源:origin: com.metamx/java-util
@Override
public void run()
{
try {
log.debug("Running %s (delay %s)", callable, delay);
if (callable.call() == Signal.REPEAT) {
log.debug("Rescheduling %s (delay %s)", callable, delay);
exec.schedule(this, delay.getMillis(), TimeUnit.MILLISECONDS);
} else {
log.debug("Stopped rescheduling %s (delay %s)", callable, delay);
}
}
catch (Throwable e) {
log.error(e, "Uncaught exception.");
}
}
},
代码示例来源:origin: metamx/java-util
@Override
public void run()
{
try {
log.debug("Running %s (delay %s)", callable, delay);
if (callable.call() == Signal.REPEAT) {
log.debug("Rescheduling %s (delay %s)", callable, delay);
exec.schedule(this, delay.getMillis(), TimeUnit.MILLISECONDS);
} else {
log.debug("Stopped rescheduling %s (delay %s)", callable, delay);
}
}
catch (Throwable e) {
log.error(e, "Uncaught exception.");
}
}
},
代码示例来源:origin: com.metamx/java-util
public Map<String, Long> to(String key, Map<String, Long> curr)
{
final Map<String, Long> prev = prevs.put(key, curr);
if (prev != null) {
return subtract(curr, prev);
}
else {
log.debug("No previous data for key[%s]", key);
return null;
}
}
代码示例来源:origin: com.metamx/server-metrics
public Map<String, Long> to(String key, Map<String, Long> curr)
{
final Map<String, Long> prev = prevs.put(key, curr);
if (prev != null) {
return subtract(curr, prev);
}
else {
log.debug("No previous data for key[%s]", key);
return null;
}
}
代码示例来源:origin: com.n3twork.druid/server-metrics
public Map<String, Long> to(String key, Map<String, Long> curr)
{
final Map<String, Long> prev = prevs.put(key, curr);
if (prev != null) {
return subtract(curr, prev);
}
else {
log.debug("No previous data for key[%s]", key);
return null;
}
}
代码示例来源:origin: metamx/java-util
public Map<String, Long> to(String key, Map<String, Long> curr)
{
final Map<String, Long> prev = prevs.put(key, curr);
if (prev != null) {
return subtract(curr, prev);
}
else {
log.debug("No previous data for key[%s]", key);
return null;
}
}
代码示例来源:origin: com.n3twork.druid/druid-server
@Override
public ClientResponse<InputStream> done(ClientResponse<AppendableByteArrayInputStream> clientResponse)
{
long stopTime = System.currentTimeMillis();
log.debug(
"Completed request to url[%s] with %,d bytes returned in %,d millis [%,f b/s].",
url,
byteCount,
stopTime - startTime,
byteCount / (0.0001 * (stopTime - startTime))
);
return super.done(clientResponse);
}
}
代码示例来源:origin: com.metamx/java-util
private void awaitStarted()
{
try {
if (!startLatch.await(1, TimeUnit.SECONDS)) {
throw new RejectedExecutionException("Service is not started.");
}
if (isTerminated()) {
throw new RejectedExecutionException("Service is closed.");
}
}
catch (InterruptedException e) {
log.debug("Interrupted waiting for start");
Thread.currentThread().interrupt();
throw new RuntimeException(e);
}
}
代码示例来源:origin: com.metamx/java-util
@Override
public void run()
{
if (prevSignal == null || prevSignal == Signal.REPEAT) {
exec.schedule(this, rate.getMillis(), TimeUnit.MILLISECONDS);
}
try {
log.debug("Running %s (period %s)", callable, rate);
prevSignal = callable.call();
}
catch(Throwable e) {
log.error(e, "Uncaught exception.");
}
}
},
代码示例来源:origin: metamx/java-util
@Override
public void run()
{
if (prevSignal == null || prevSignal == Signal.REPEAT) {
exec.schedule(this, rate.getMillis(), TimeUnit.MILLISECONDS);
}
try {
log.debug("Running %s (period %s)", callable, rate);
prevSignal = callable.call();
}
catch(Throwable e) {
log.error(e, "Uncaught exception.");
}
}
},
代码示例来源:origin: metamx/java-util
private void awaitStarted()
{
try {
if (!startLatch.await(1, TimeUnit.SECONDS)) {
throw new RejectedExecutionException("Service is not started.");
}
if (isTerminated()) {
throw new RejectedExecutionException("Service is closed.");
}
}
catch (InterruptedException e) {
log.debug("Interrupted waiting for start");
Thread.currentThread().interrupt();
throw new RuntimeException(e);
}
}
代码示例来源:origin: com.metamx/emitter
private void awaitStarted()
{
try {
if (!startLatch.await(1, TimeUnit.SECONDS)) {
throw new RejectedExecutionException("Service is not started.");
}
if (isTerminated()) {
throw new RejectedExecutionException("Service is closed.");
}
}
catch (InterruptedException e) {
log.debug("Interrupted waiting for start");
Thread.currentThread().interrupt();
throw new RuntimeException(e);
}
}
代码示例来源:origin: com.metamx/java-util
private static void awaitNextRetry(final Throwable e, final int nTry, final boolean quiet) throws InterruptedException
{
final long baseSleepMillis = 1000;
final long maxSleepMillis = 60000;
final double fuzzyMultiplier = Math.min(Math.max(1 + 0.2 * ThreadLocalRandom.current().nextGaussian(), 0), 2);
final long sleepMillis = (long) (Math.min(maxSleepMillis, baseSleepMillis * Math.pow(2, nTry - 1))
* fuzzyMultiplier);
if (quiet) {
log.debug(e, "Failed on try %d, retrying in %,dms.", nTry, sleepMillis);
} else {
log.warn(e, "Failed on try %d, retrying in %,dms.", nTry, sleepMillis);
}
Thread.sleep(sleepMillis);
}
}
代码示例来源:origin: metamx/java-util
private static void awaitNextRetry(final Throwable e, final int nTry, final boolean quiet) throws InterruptedException
{
final long baseSleepMillis = 1000;
final long maxSleepMillis = 60000;
final double fuzzyMultiplier = Math.min(Math.max(1 + 0.2 * ThreadLocalRandom.current().nextGaussian(), 0), 2);
final long sleepMillis = (long) (Math.min(maxSleepMillis, baseSleepMillis * Math.pow(2, nTry - 1))
* fuzzyMultiplier);
if (quiet) {
log.debug(e, "Failed on try %d, retrying in %,dms.", nTry, sleepMillis);
} else {
log.warn(e, "Failed on try %d, retrying in %,dms.", nTry, sleepMillis);
}
Thread.sleep(sleepMillis);
}
}
代码示例来源:origin: com.n3twork.druid/druid-processing
@Override
public Cursor apply(@Nullable Cursor input)
{
log.debug("Running over cursor[%s]", adapter.getInterval(), input.getTime());
return input;
}
}
代码示例来源:origin: com.n3twork.druid/druid-processing
@Override
public Cursor apply(Cursor input)
{
log.debug("Running over cursor[%s]", adapter.getInterval(), input.getTime());
return input;
}
}
代码示例来源:origin: com.n3twork.druid/druid-server
@Override
public ClientResponse<AppendableByteArrayInputStream> handleResponse(HttpResponse response)
{
log.debug("Initial response from url[%s]", url);
startTime = System.currentTimeMillis();
byteCount += response.getContent().readableBytes();
return super.handleResponse(response);
}
代码示例来源:origin: com.n3twork.druid/druid-server
@Override
public DruidCoordinatorRuntimeParams run(DruidCoordinatorRuntimeParams params)
{
// Display info about all available segments
final Set<DataSegment> availableSegments = coordinator.getAvailableDataSegments();
if (log.isDebugEnabled()) {
log.debug("Available DataSegments");
for (DataSegment dataSegment : availableSegments) {
log.debug(" %s", dataSegment);
}
}
return params.buildFromExisting()
.withAvailableSegments(availableSegments)
.build();
}
}
代码示例来源:origin: com.n3twork.druid/druid-server
public Long getAvailableSize()
{
long maxSize = getMaxSize();
long sizeUsed = getSizeUsed();
long availableSize = maxSize - sizeUsed;
log.debug(
"Server[%s], MaxSize[%,d], CurrSize[%,d], QueueSize[%,d], SizeUsed[%,d], AvailableSize[%,d]",
server.getName(),
maxSize,
getCurrServerSize(),
getLoadQueueSize(),
sizeUsed,
availableSize
);
return availableSize;
}
代码示例来源:origin: metamx/java-util
@Override
public void channelDisconnected(ChannelHandlerContext context, ChannelStateEvent event) throws Exception
{
if (log.isDebugEnabled()) {
log.debug("[%s] Channel disconnected", requestDesc);
}
// response is non-null if we received initial chunk and then exception occurs
if (response != null) {
handler.exceptionCaught(response, new ChannelException("Channel disconnected"));
}
channel.close();
channelResourceContainer.returnResource();
if (!retVal.isDone()) {
log.warn("[%s] Channel disconnected before response complete", requestDesc);
retVal.setException(new ChannelException("Channel disconnected"));
}
context.sendUpstream(event);
}
内容来源于网络,如有侵权,请联系作者删除!