Начинаем переход на SLF4j+Log4j2
This commit is contained in:
@@ -22,6 +22,8 @@ import lwjake2.Defines;
|
||||
import lwjake2.Globals;
|
||||
import lwjake2.client.CL;
|
||||
import lwjake2.qcommon.Com;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FilenameFilter;
|
||||
@@ -32,6 +34,7 @@ import java.util.regex.PatternSyntaxException;
|
||||
* Sys
|
||||
*/
|
||||
public final class Sys extends Defines {
|
||||
private static final Logger logger = LoggerFactory.getLogger(Sys.class);
|
||||
|
||||
public static void Error(String error) {
|
||||
|
||||
@@ -230,7 +233,14 @@ public final class Sys extends Defines {
|
||||
if (Globals.nostdout != null && Globals.nostdout.value != 0)
|
||||
return;
|
||||
|
||||
System.out.print(msg);
|
||||
while (msg.startsWith("\n")) {
|
||||
msg = msg.substring(1);
|
||||
}
|
||||
while (msg.endsWith("\n")) {
|
||||
msg = msg.substring(0, msg.lastIndexOf("\n"));
|
||||
}
|
||||
|
||||
logger.info(msg);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user