(String label, String text, Object... arg)
| 12 | public static boolean isEnabled = true; |
| 13 | |
| 14 | public static void write(String label, String text, Object... arg) { |
| 15 | if (isEnabled) { |
| 16 | file.writeString(Strings.format("[@] [@] @\n", |
| 17 | java.time.format.DateTimeFormatter.ofPattern("MM-dd-yyyy HH:mm:ss").format(java.time.LocalDateTime.now()), label, Strings.format(text, arg)), true); |
| 18 | |
| 19 | if (file.length() > maxSize) { |
| 20 | Log.warn("Admin logs --> file '@ALog-@.txt reached the limit of 1 MB. Creating new file ...", PVars.ALogPath, files); |
| 21 | newFile(); |
| 22 | } |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | public static void init() { |
| 27 | //init settings |
no test coverage detected