Migrate another batch of FilePrinter users to slf4j.Logger

Another FilePrinter method removed.
This commit is contained in:
P0nk
2022-02-08 21:00:51 +01:00
parent 53465bba25
commit 0c60606b4e
15 changed files with 97 additions and 120 deletions

View File

@@ -130,40 +130,6 @@ public class FilePrinter {
}
}
public static void print(final String name, final String s) {
print(name, s, true);
}
public static void print(final String name, final String s, boolean line) {
System.out.println("Log: " + name);
System.out.println(s);
System.out.println();
FileOutputStream out = null;
String file = FILE_PATH + name;
try {
File outputFile = new File(file);
if (outputFile.getParentFile() != null) {
outputFile.getParentFile().mkdirs();
}
out = new FileOutputStream(file, true);
out.write(s.getBytes());
if (line) {
out.write("\r\n---------------------------------\r\n".getBytes());
}
out.write("\r\n".getBytes());
} catch (IOException ess) {
ess.printStackTrace();
} finally {
try {
if (out != null) {
out.close();
}
} catch (IOException ignore) {
ignore.printStackTrace();
}
}
}
private static String getString(final Throwable e) {
String retValue = null;
StringWriter sw = null;