FINERACT-942 Remove bad logging pattern(Use of system.out) and added checkstyle
This commit is contained in:
committed by
Michael Vorburger ⛑️
parent
9ce72fe67b
commit
20e8a02294
+5
-2
@@ -22,10 +22,13 @@ import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
|
||||
public abstract class ApplicationExitUtil {
|
||||
|
||||
public abstract class ApplicationExitUtil {
|
||||
private final static Logger LOG = LoggerFactory.getLogger(ApplicationExitUtil.class);
|
||||
private ApplicationExitUtil() {}
|
||||
|
||||
public static void waitForKeyPressToCleanlyExit(ConfigurableApplicationContext ctx) throws IOException {
|
||||
@@ -34,7 +37,7 @@ public abstract class ApplicationExitUtil {
|
||||
// button).. In the case of MariaDB4j that's a problem because then the
|
||||
// mysqld won't be stopped, so:
|
||||
// (@see https://bugs.eclipse.org/bugs/show_bug.cgi?id=38016)
|
||||
System.out.println("\nHit Enter to quit...");
|
||||
LOG.info("\nHit Enter to quit...");
|
||||
// NOTE: In Eclipse, System.console() is not available.. so:
|
||||
// (@see https://bugs.eclipse.org/bugs/show_bug.cgi?id=122429)
|
||||
BufferedReader d = new BufferedReader(new InputStreamReader(System.in, StandardCharsets.UTF_8));
|
||||
|
||||
+5
-3
@@ -25,6 +25,8 @@ import java.io.Writer;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* Exception with multiple root causes.
|
||||
@@ -41,7 +43,7 @@ import java.util.List;
|
||||
* @author Michael Vorburger.ch <mike@vorburger.ch>
|
||||
*/
|
||||
public class MultiException extends Exception {
|
||||
|
||||
private final static Logger LOG = LoggerFactory.getLogger(MultiException.class);
|
||||
private final List<Throwable> throwables;
|
||||
|
||||
public MultiException(List<Throwable> problems) {
|
||||
@@ -71,10 +73,10 @@ public class MultiException extends Exception {
|
||||
|
||||
@Override
|
||||
public void printStackTrace() {
|
||||
System.err.println(super.getMessage());
|
||||
LOG.info("{}", super.getMessage());
|
||||
int i = 0;
|
||||
for (Throwable e : throwables) {
|
||||
System.err.print(++i + ".");
|
||||
LOG.info("{}.",++i);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user