springboot color log output garbled

<! -. 0 log format and color rendering -> 
	<! - dependent color rendering log class -> 
	<conversionRule conversionWord = "CLR" 
		converterClass = "org.springframework.boot.logging.logback.ColorConverter" / > 
	<conversionRule conversionWord = "WEX" 
		converterClass = "org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" /> 
	<conversionRule conversionWord = "WEx" 
		converterClass = "org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter" /> 
	< ! - color log format -> 
	<Property name = "CONSOLE_LOG_PATTERN"
		value = "$ {CONSOLE_LOG_PATTERN: - % clr (% d {yyyy-MM-dd HH: mm: ss.SSS}) {faint}% clr ($ {LOG_LEVEL_PATTERN: -% 5p})% clr ($ {PID: -}) {magenta}% clr (---) {faint}% clr ([% 15.15t]) {faint}% clr (% - 40.40logger {39}) {cyan}% clr (:) {faint} n-m% {$% LOG_EXCEPTION_CONVERSION_WORD: - WEx%}} "/>


	<! -. 1 to the console -> 
	<appender name = "the CONSOLE" 
		class = "ch.qos.logback.core.ConsoleAppender"> 
		<! - This log is developed using appender, the bottom only configuration level, the console log level output log information is greater than or equal to this level -> 
		<filter class = "ch.qos.logback.classic.filter.ThresholdFilter"> 
			<level> Debug </ level> 
		</ filter> 
		<Encoder> 
			<the Pattern> CONSOLE_LOG_PATTERN $ {} </ the Pattern> 
			<-! character set -> 
			<charset> UTF-. 8 </ charset> 
		</ Encoder> 
	</ the appender>

  

Color configuration log output, the output console output always garbled characters.

 

 

Solution: Install the plug-AnsiConsole

In Help-> EclipseMarketplace-> find AnsiConsole, can be installed.

Renderings:

 

Reference great God blog: https: //blog.csdn.net/hzh_csdn/article/details/51332439

 

Guess you like

Origin www.cnblogs.com/webttt/p/11479360.html