From cd67de9db968fb1512f94b6cddc8d7b92036d616 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C7=B3=C3=83=C3=8E?= <1101766085@qq.com> Date: Fri, 1 Dec 2023 13:39:35 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20mica-http=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=EF=BC=8C=E5=8F=AF=E4=BB=A5=E5=9C=A8=E6=B2=A1=E6=9C=89=20slf4j?= =?UTF-8?q?=20=E7=9A=84=E6=83=85=E5=86=B5=E4=B8=8B=E5=BC=80=E5=90=AF?= =?UTF-8?q?=E6=8E=A7=E5=88=B6=E5=8F=B0=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/net/dreamlu/mica/http/HttpConsoleLogger.java | 3 +-- mica-http/src/main/java/net/dreamlu/mica/http/HttpRequest.java | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/mica-http/src/main/java/net/dreamlu/mica/http/HttpConsoleLogger.java b/mica-http/src/main/java/net/dreamlu/mica/http/HttpConsoleLogger.java index 3601aa51f..877def546 100644 --- a/mica-http/src/main/java/net/dreamlu/mica/http/HttpConsoleLogger.java +++ b/mica-http/src/main/java/net/dreamlu/mica/http/HttpConsoleLogger.java @@ -33,8 +33,7 @@ public enum HttpConsoleLogger implements HttpLoggingInterceptor.Logger { public void log(@Nonnull String message) { // 统一添加前缀,方便在茫茫日志中查看 - System.out.print("ConsoleLogger: "); - System.out.println(message); + System.out.printf("HttpLogger: %s\n", message); } } diff --git a/mica-http/src/main/java/net/dreamlu/mica/http/HttpRequest.java b/mica-http/src/main/java/net/dreamlu/mica/http/HttpRequest.java index a2010c03e..4b0fbd31f 100644 --- a/mica-http/src/main/java/net/dreamlu/mica/http/HttpRequest.java +++ b/mica-http/src/main/java/net/dreamlu/mica/http/HttpRequest.java @@ -57,7 +57,7 @@ * @author L.cm */ public class HttpRequest { - private static final String DEFAULT_USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"; + private static final String DEFAULT_USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0"; private static final MediaType APPLICATION_JSON = MediaType.get("application/json"); private static volatile OkHttpClient httpClient = new OkHttpClient(); @Nullable