修改 ANSI 日志.
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
package com.orion.ops.framework.banner.core;
|
||||
|
||||
import com.orion.lang.utils.Threads;
|
||||
import com.orion.lang.utils.ansi.AnsiColor;
|
||||
import com.orion.lang.utils.ansi.AnsiAppender;
|
||||
import com.orion.lang.utils.ansi.style.color.AnsiForeground;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.ApplicationArguments;
|
||||
@@ -37,19 +38,19 @@ public class BannerApplicationRunner implements ApplicationRunner {
|
||||
|
||||
@Override
|
||||
public void run(ApplicationArguments args) {
|
||||
String line = AnsiColor.GLOSS_GREEN.color(":: orion-ops-launch v" + version + " 服务已启动(" + env + ") ::\n") +
|
||||
AnsiColor.GLOSS_GREEN.color(":: swagger 文档 ") +
|
||||
AnsiColor.GLOSS_BLUE.color("http://127.0.0.1:" + port + "/doc.html\n") +
|
||||
AnsiColor.GLOSS_GREEN.color(":: druid console ") +
|
||||
AnsiColor.GLOSS_BLUE.color("http://127.0.0.1:" + port + "/druid/index.html\n") +
|
||||
AnsiColor.GLOSS_GREEN.color(":: actuator endpoint ") +
|
||||
AnsiColor.GLOSS_BLUE.color("http://127.0.0.1:" + port + managementEndpoints + "\n") +
|
||||
AnsiColor.GLOSS_GREEN.color(":: admin console ") +
|
||||
AnsiColor.GLOSS_BLUE.color("http://127.0.0.1:" + port + adminSeverContextPath + "\n") +
|
||||
AnsiColor.GLOSS_GREEN.color(":: server 健康检测 ") +
|
||||
AnsiColor.GLOSS_BLUE +
|
||||
"curl -X GET --location \"http://127.0.0.1:" + port + apiPrefix + "/server/bootstrap/health\"" +
|
||||
AnsiColor.SUFFIX;
|
||||
String line = AnsiAppender.create()
|
||||
.append(AnsiForeground.BRIGHT_GREEN, ":: orion-ops-launch v" + version + " 服务已启动(" + env + ") ::\n")
|
||||
.append(AnsiForeground.BRIGHT_GREEN, ":: swagger 文档 ")
|
||||
.append(AnsiForeground.BRIGHT_BLUE, "http://127.0.0.1:" + port + "/doc.html\n")
|
||||
.append(AnsiForeground.BRIGHT_GREEN, ":: druid console ")
|
||||
.append(AnsiForeground.BRIGHT_BLUE, "http://127.0.0.1:" + port + "/druid/index.html\n")
|
||||
.append(AnsiForeground.BRIGHT_GREEN, ":: actuator endpoint ")
|
||||
.append(AnsiForeground.BRIGHT_BLUE, "http://127.0.0.1:" + port + managementEndpoints + "\n")
|
||||
.append(AnsiForeground.BRIGHT_GREEN, ":: admin console ")
|
||||
.append(AnsiForeground.BRIGHT_BLUE, "http://127.0.0.1:" + port + adminSeverContextPath + "\n")
|
||||
.append(AnsiForeground.BRIGHT_GREEN, ":: server 健康检测 ")
|
||||
.append(AnsiForeground.BRIGHT_BLUE, "curl -X GET --location \"http://127.0.0.1:" + port + apiPrefix + "/server/bootstrap/health\"")
|
||||
.toString();
|
||||
Threads.start(() -> {
|
||||
Threads.sleep(1000L);
|
||||
System.out.println(line);
|
||||
|
||||
Reference in New Issue
Block a user