From 4fb80ac73933d049a7f8c84c8dbc759bec2c5b8f Mon Sep 17 00:00:00 2001 From: renwj Date: Mon, 13 Mar 2023 17:29:59 +0800 Subject: [PATCH] =?UTF-8?q?[dev=5Farch=5Fopt=5F3.0]=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E6=89=93=E5=8D=B0=E9=80=BB=E8=BE=91=EF=BC=8C?= =?UTF-8?q?=E5=8E=BB=E6=8E=89=E5=AF=B9=E8=B1=A1=E9=94=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../utilcode/mogo/logger/LoggerPrinter.java | 39 +++++-------------- 1 file changed, 9 insertions(+), 30 deletions(-) diff --git a/core/mogo-core-utils/src/main/java/com/mogo/eagle/core/utilcode/mogo/logger/LoggerPrinter.java b/core/mogo-core-utils/src/main/java/com/mogo/eagle/core/utilcode/mogo/logger/LoggerPrinter.java index ce7fde2c02..e67902356f 100644 --- a/core/mogo-core-utils/src/main/java/com/mogo/eagle/core/utilcode/mogo/logger/LoggerPrinter.java +++ b/core/mogo-core-utils/src/main/java/com/mogo/eagle/core/utilcode/mogo/logger/LoggerPrinter.java @@ -132,32 +132,9 @@ final class LoggerPrinter implements Printer { } } - private synchronized void log( String tag, LogLevel logLevel, String msg, Object... args) { + private void log( String tag, LogLevel logLevel, String msg, Object... args) { String message = this.createMessage(msg, args); - int methodCount = this.getMethodCount(); - this.logTopBorder(logLevel, tag); - this.logHeaderContent(logLevel, tag, methodCount); - byte[] bytes = message.getBytes(); - int length = bytes.length; - if (length <= 4000) { - if (methodCount > 0) { - this.logDivider(logLevel, tag); - } - - this.logContent(logLevel, tag, message); - this.logBottomBorder(logLevel, tag); - } else { - if (methodCount > 0) { - this.logDivider(logLevel, tag); - } - - for (int i = 0; i < length; i += 4000) { - int count = Math.min(length - i, 4000); - this.logContent(logLevel, tag, new String(bytes, i, count)); - } - - this.logBottomBorder(logLevel, tag); - } + logContent(logLevel, tag, message); } private void logTopBorder(LogLevel logLevel, String tag) { @@ -198,11 +175,13 @@ final class LoggerPrinter implements Printer { } private void logContent( LogLevel logLevel, String tag, String chunk) { - String[] lines = chunk.split( System.getProperty("line.separator")); - - for ( String line : lines) { - this.logChunk(logLevel, tag, "║ " + line); - } +// String[] lines = chunk.split( System.getProperty("line.separator")); +// +// for ( String line : lines) { +// this.logChunk(logLevel, tag, "║ " + line); +// } +// + logChunk(logLevel, tag, chunk); } private void logChunk( LogLevel logLevel, String tag, String chunk) {