Skip to content

Commit

Permalink
✨ mica-http 优化,可以在没有 slf4j 的情况下开启控制台日志
Browse files Browse the repository at this point in the history
  • Loading branch information
li-xunhuan committed Dec 1, 2023
1 parent 264e327 commit cd67de9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cd67de9

Please sign in to comment.