首页 > 其他分享 >Spring Boot 控制台日志打印颜色表

Spring Boot 控制台日志打印颜色表

时间:2023-11-30 18:46:13浏览次数:41  
标签:String Spring Boot public BRIGHT static 033 控制台 final

    // Reset
    public static final String RESET = "\033[0m";  // Text Reset

    // Regular Colors
    public static final String WHITE = "\033[0;30m";   // WHITE
    public static final String RED = "\033[0;31m";     // RED
    public static final String GREEN = "\033[0;32m";   // GREEN
    public static final String YELLOW = "\033[0;33m";  // YELLOW
    public static final String BLUE = "\033[0;34m";    // BLUE
    public static final String PURPLE = "\033[0;35m";  // PURPLE
    public static final String CYAN = "\033[0;36m";    // CYAN
    public static final String GREY = "\033[0;37m";   // GREY

    // Bold
    public static final String WHITE_BOLD = "\033[1;30m";  // WHITE
    public static final String RED_BOLD = "\033[1;31m";    // RED
    public static final String GREEN_BOLD = "\033[1;32m";  // GREEN
    public static final String YELLOW_BOLD = "\033[1;33m"; // YELLOW
    public static final String BLUE_BOLD = "\033[1;34m";   // BLUE
    public static final String PURPLE_BOLD = "\033[1;35m"; // PURPLE
    public static final String CYAN_BOLD = "\033[1;36m";   // CYAN
    public static final String GREY_BOLD = "\033[1;37m";  // GREY

    // Underline
    public static final String WHITE_UNDERLINED = "\033[4;30m";  // WHITE
    public static final String RED_UNDERLINED = "\033[4;31m";    // RED
    public static final String GREEN_UNDERLINED = "\033[4;32m";  // GREEN
    public static final String YELLOW_UNDERLINED = "\033[4;33m"; // YELLOW
    public static final String BLUE_UNDERLINED = "\033[4;34m";   // BLUE
    public static final String PURPLE_UNDERLINED = "\033[4;35m"; // PURPLE
    public static final String CYAN_UNDERLINED = "\033[4;36m";   // CYAN
    public static final String GREY_UNDERLINED = "\033[4;37m";  // GREY

    // Background
    public static final String WHITE_BACKGROUND = "\033[40m";  // WHITE
    public static final String RED_BACKGROUND = "\033[41m";    // RED
    public static final String GREEN_BACKGROUND = "\033[42m";  // GREEN
    public static final String YELLOW_BACKGROUND = "\033[43m"; // YELLOW
    public static final String BLUE_BACKGROUND = "\033[44m";   // BLUE
    public static final String PURPLE_BACKGROUND = "\033[45m"; // PURPLE
    public static final String CYAN_BACKGROUND = "\033[46m";   // CYAN
    public static final String GREY_BACKGROUND = "\033[47m";  // GREY

    // High Intensity
    public static final String WHITE_BRIGHT = "\033[0;90m";  // WHITE
    public static final String RED_BRIGHT = "\033[0;91m";    // RED
    public static final String GREEN_BRIGHT = "\033[0;92m";  // GREEN
    public static final String YELLOW_BRIGHT = "\033[0;93m"; // YELLOW
    public static final String BLUE_BRIGHT = "\033[0;94m";   // BLUE
    public static final String PURPLE_BRIGHT = "\033[0;95m"; // PURPLE
    public static final String CYAN_BRIGHT = "\033[0;96m";   // CYAN
    public static final String GREY_BRIGHT = "\033[0;97m";  // GREY

    // Bold High Intensity
    public static final String WHITE_BOLD_BRIGHT = "\033[1;90m"; // WHITE
    public static final String RED_BOLD_BRIGHT = "\033[1;91m";   // RED
    public static final String GREEN_BOLD_BRIGHT = "\033[1;92m"; // GREEN
    public static final String YELLOW_BOLD_BRIGHT = "\033[1;93m";// YELLOW
    public static final String BLUE_BOLD_BRIGHT = "\033[1;94m";  // BLUE
    public static final String PURPLE_BOLD_BRIGHT = "\033[1;95m";// PURPLE
    public static final String CYAN_BOLD_BRIGHT = "\033[1;96m";  // CYAN
    public static final String GREY_BOLD_BRIGHT = "\033[1;97m"; // GREY

    // High Intensity backgrounds
    public static final String WHITE_BACKGROUND_BRIGHT = "\033[0;100m";// WHITE
    public static final String RED_BACKGROUND_BRIGHT = "\033[0;101m";// RED
    public static final String GREEN_BACKGROUND_BRIGHT = "\033[0;102m";// GREEN
    public static final String YELLOW_BACKGROUND_BRIGHT = "\033[0;103m";// YELLOW
    public static final String BLUE_BACKGROUND_BRIGHT = "\033[0;104m";// BLUE
    public static final String PURPLE_BACKGROUND_BRIGHT = "\033[0;105m"; // PURPLE
    public static final String CYAN_BACKGROUND_BRIGHT = "\033[0;106m";  // CYAN
    public static final String GREY_BACKGROUND_BRIGHT = "\033[0;107m";   // GREY

标签:String,Spring,Boot,public,BRIGHT,static,033,控制台,final
From: https://www.cnblogs.com/tobycold/p/17868000.html

相关文章

  • 如何在Spring Boot中不启动Web Server
    XYHS:用方法4,spring.main.web-application-type=none,实测可行如何在SpringBoot中不启动WebServer1.介绍SpringBoot是一个用于为各种应用快速创建新的Java应用程序的优秀框架。最流行的用途之一是作为web服务器。但是,SpringBoot有许多不需要web服务器的场景:控制台应用程序、作......
  • SpringBoot Resolved [org.springframework.web.multipart.support.MissingServletRe
    SpringBootResolved[org.springframework.web.multipart.support.MissingServletRequestPartException:Requiredrequestpart'file'isnotpresent]IDEA报错信息这个错误主要主要是指后端通过@RequestParam("file")注解标注的MultipartFile参数并没有获取到文件参数为n......
  • SpringBoot集成hutool配置定时任务,支持crontab和quartz表达式
    1、pom.xml引入hutool<dependency> <groupId>cn.hutool</groupId> <artifactId>hutool-all</artifactId> <version>修改version</version></dependency>2、Java文件packagecom.xxx.schedule;importcn.hutool.cron.CronUtil......
  • 【Spring】SpringBoot+RabbitMQ(direct/fanout/topic)の構築方法
     ■POM.xmlの中で、下記の内容を追加<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-amqp</artifactId></dependency><dependency>......
  • vulhub中spring的CVE-2018-1273漏洞复现
    ​ 1.影响版本SpringDataCommons1.13-1.13.10(IngallsSR10)SpringDataREST2.6-2.6.10(IngallsSR10)SpringDataCommons2.0to2.0.5(KaySR5)SpringDataREST3.0-3.0.5(KaySR5)2.漏洞原理SpringData是一个用于简化数据库访问,并支持云服务的开源框......
  • Spring Cloud 配置 Nacos
    一,下载Nacos 下载地址:https://github.com/alibaba/nacos/releases 二,启动Nacos安装Nacos的bin目录下,执行:startup.cmd-mstandalone 然后打开上图红框的地址 三,配置服务1配置Nacos创建命名空间(无论本地还是测试服务期,全部注册到Nacos上,通过命名空间可以区分......
  • @Autowired作用在方法上 @autowired注解放在方法上,如果方法没有参数,spring容器会在类
    @Autowired作用在方法上@autowired注解放在方法上,如果方法没有参数,spring容器会在类加载完后执行一次这个方法;如果方法中有参数的话,还会从容器中自动注入这个方法的参数,然后执行一次这个方法。@autowired用于测试的实体类User,并将这个类注入到Spring容器中,为@autowired注解......
  • SpringBoot的配置文件application.yml及加载顺序详解
    SpringBoot配置文件application.yml及加载顺序配置文件分类自定义配置文件配置文件总结Springboot中application.yml、application.properties和bootStrap.yml加载顺序SpringApplication位于项目根目录以jar包发布springboot项目时若application.yml和bootStra......
  • Spring源码学习之Web数据绑定器WebDataBinder
    WebDataBinder1.描述特殊的数据绑定器用于从web请求参数到JavaBean对象的数据绑定。专为web环境,但不依赖于ServletAPI;作为更具体的DataBinder变体的基类,例如ServletRequestDataBinder。2.注意:数据绑定会暴露对象图中不打算被外部客户端访问或修改的部分,从而导致安全问题。因......
  • [转载]控制台程序隐藏的四种方法总结
    原帖地址找不到了。学习计算机,往往先从Windows环境下学习编程,学习编程,往往从C学起,学习C,往往又从控制台程序学习,何为控制台,就是那个黑框白字的界面。对于这样一个最初认为奇陋无比而现在认为无所不能的编程平台,有时候需要将界面隐藏起来。那么如何做呢?方法1:在头文件下加上一句预......