Skip to content

Commit

Permalink
fix:logger
Browse files Browse the repository at this point in the history
  • Loading branch information
yhyzgn committed Feb 19, 2025
1 parent 1ef4884 commit cd23dcc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ext.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ext {
group = "com.yhyzgn.http"
version = "2.0.1"
version = "2.0.2"
url = "github.com/yhyzgn/pigeon" as Object
repository = [
release : "https://oss.sonatype.org/service/local/staging/deploy/maven2/",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@ private void log(Object tag, LogLines lines) {
.append(System.lineSeparator())
.append("├────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────")
.append(System.lineSeparator());
lines.lines().forEach(item -> sb.append("│ ").append(item.msg.contains("{}") ? String.format(item.msg.replace("{}", "%s"), item.args) : item.msg).append(System.lineSeparator()));
lines.lines().stream()
.filter(Objects::nonNull)
.peek(item -> item.msg = Optional.ofNullable(item.msg).orElse(""))
.forEach(item -> sb.append("│ ").append(item.msg.contains("{}") ? String.format(item.msg.replace("{}", "%s"), item.args) : item.msg).append(System.lineSeparator()));
sb.append("└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────");
LOGGER.info(sb.toString());
}
Expand Down
2 changes: 1 addition & 1 deletion pigeon/src/main/java/com/yhy/http/pigeon/utils/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/
public class Utils {
private static final Type[] EMPTY_TYPE_ARRAY = new Type[0];
public final static String VERSION = "2.0.1";
public final static String VERSION = "2.0.2";

public static boolean isEmpty(Object object) {
switch (object) {
Expand Down

0 comments on commit cd23dcc

Please sign in to comment.