no message
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
package Visual_DVM_2021.UI.Interface;
|
||||
import Common.Utils.CommonUtils;
|
||||
import Common_old.Current;
|
||||
import Common_old.UI.DebugPrintLevel;
|
||||
import Common_old.UI.UI;
|
||||
@@ -25,7 +26,7 @@ public interface Loggable {
|
||||
default void Print(String message) {
|
||||
try {
|
||||
FileWriter Log = new FileWriter(getLogFile(), true);
|
||||
String datedMessage = Utils.Brackets(new Date()) + " " + message;
|
||||
String datedMessage = CommonUtils.Brackets(new Date()) + " " + message;
|
||||
Log.write(datedMessage + "\n");
|
||||
Log.close();
|
||||
} catch (Exception ignored) {
|
||||
@@ -33,7 +34,7 @@ public interface Loggable {
|
||||
}
|
||||
default void Print(DebugPrintLevel level, String message) {
|
||||
if (level.isEnabled())
|
||||
Print(Utils.Brackets(level.getDescription()) + " " + message);
|
||||
Print(CommonUtils.Brackets(level.getDescription()) + " " + message);
|
||||
}
|
||||
default void PrintException(Exception ex) {
|
||||
StringWriter out = new StringWriter();
|
||||
@@ -43,6 +44,6 @@ public interface Loggable {
|
||||
Print(out.toString());
|
||||
if (Current.hasUI())
|
||||
UI.Error("Возникло исключение. Подробности в файле журнала\n" +
|
||||
Utils.Brackets(getLogFile().getAbsolutePath()));
|
||||
CommonUtils.Brackets(getLogFile().getAbsolutePath()));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user