Fix logging checkstye violations in samples

See gh-14911
This commit is contained in:
Phillip Webb
2018-10-25 09:27:32 -07:00
parent b424fa6039
commit 5a4220c773
12 changed files with 53 additions and 52 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,8 +16,8 @@
package samples.websocket.undertow.echo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.web.socket.CloseStatus;
import org.springframework.web.socket.TextMessage;
@@ -30,7 +30,7 @@ import org.springframework.web.socket.handler.TextWebSocketHandler;
*/
public class EchoWebSocketHandler extends TextWebSocketHandler {
private static Logger logger = LoggerFactory.getLogger(EchoWebSocketHandler.class);
private static Log logger = LogFactory.getLog(EchoWebSocketHandler.class);
private final EchoService echoService;

View File

@@ -24,8 +24,8 @@ import java.util.TimerTask;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CopyOnWriteArrayList;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
/**
* Sets up the timer for the multi-player snake game WebSocket example.
@@ -36,7 +36,7 @@ public final class SnakeTimer {
private static final Object MONITOR = new Object();
private static final Logger log = LoggerFactory.getLogger(SnakeTimer.class);
private static final Log logger = LogFactory.getLog(SnakeTimer.class);
private static final ConcurrentHashMap<Integer, Snake> snakes = new ConcurrentHashMap<>();
@@ -103,7 +103,7 @@ public final class SnakeTimer {
tick();
}
catch (Throwable ex) {
log.error("Caught to prevent timer from shutting down", ex);
logger.error("Caught to prevent timer from shutting down", ex);
}
}
}, TICK_DELAY, TICK_DELAY);