Loggers should not be public fields
public interface WebSocket extends Closeable {
- Logger LOG = Logger.getLogger(WebSocket.class.getName());
-
WebSocket send(Message message);
default WebSocket sendText(CharSequence data) {
@@ -65,7 +63,7 @@ default void onText(CharSequence data) {
}
default void onError(Throwable cause) {
- LOG.log(WARNING, cause.getMessage(), cause);
+ Logger.getLogger(WebSocket.class.getName()).log(WARNING, cause.getMessage(), cause);
}
}
