mirror of
https://github.com/jwdeveloper/TikTokLiveJava.git
synced 2026-02-28 01:09:40 -05:00
Revert to StringBuilder and stacking stream line!
This commit is contained in:
@@ -136,10 +136,12 @@ public class TikTokLiveClientBuilder implements LiveClientBuilder {
|
|||||||
handler.setFormatter(new Formatter() {
|
handler.setFormatter(new Formatter() {
|
||||||
@Override
|
@Override
|
||||||
public String format(LogRecord record) {
|
public String format(LogRecord record) {
|
||||||
return ConsoleColors.GREEN + "[" + record.getLoggerName() + "] " +
|
var sb = new StringBuilder();
|
||||||
ConsoleColors.GREEN + "[" + record.getLevel() + "]: " +
|
sb.append(ConsoleColors.GREEN).append("[").append(record.getLoggerName()).append("] ");
|
||||||
ConsoleColors.WHITE_BRIGHT + record.getMessage() +
|
sb.append(ConsoleColors.GREEN).append("[").append(record.getLevel()).append("]: ");
|
||||||
ConsoleColors.RESET + "\n";
|
sb.append(ConsoleColors.WHITE_BRIGHT).append(record.getMessage());
|
||||||
|
sb.append(ConsoleColors.RESET).append("\n");
|
||||||
|
return sb.toString();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
logger.setUseParentHandlers(false);
|
logger.setUseParentHandlers(false);
|
||||||
|
|||||||
@@ -40,6 +40,9 @@ public class TikTokCookieJar {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String parseCookies() {
|
public String parseCookies() {
|
||||||
return cookies.entrySet().stream().map(entry -> entry.getKey()+"="+entry.getValue()+";").collect(Collectors.joining());
|
return cookies.entrySet()
|
||||||
|
.stream()
|
||||||
|
.map(entry -> entry.getKey()+"="+entry.getValue()+";")
|
||||||
|
.collect(Collectors.joining());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user