Fix formatter
This commit is contained in:
parent
6155731058
commit
dc474a2c2f
@ -39,11 +39,11 @@ class FileFormatter extends Formatter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static String logMsgToFile(Level level, String msg, String dateForLog) {
|
private static String logMsgToFile(Level level, String msg, String dateForLog) {
|
||||||
return String.format("%s{%s} %s", dateForLog, level.toString(), msg);
|
return String.format("%s{%s} %s\n", dateForLog, level.toString(), msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String logThrowableToFile(Level level, String message, Throwable throwable, String dateForLog) {
|
private static String logThrowableToFile(Level level, String message, Throwable throwable, String dateForLog) {
|
||||||
String throwableLog = String.format("%s{%s} %s - %s", dateForLog, level.toString(), message, throwable.toString());
|
String throwableLog = String.format("%s{%s} %s - %s\n", dateForLog, level.toString(), message, throwable.toString());
|
||||||
for (StackTraceElement element : throwable.getStackTrace()) {
|
for (StackTraceElement element : throwable.getStackTrace()) {
|
||||||
throwableLog += "\tat " + element + "\n";
|
throwableLog += "\tat " + element + "\n";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user