how to color the log of Wildfly - Jboss Server console on Eclipse

六月ゝ 毕业季﹏ 提交于 2019-12-18 09:18:23

问题


I am using server Wildfly version 18.0.0 and I want to color the log of my server while starting I am using Eclipse as IDE. just like tomcat server Warn, Info.... How to do that?


回答1:


You can define a color map to assign a color to different log levels.

The format is a comma-separated list of LEVEL:COLOR.

  • Valid levels: finest, finer, fine, config, trace, debug, info, warning, warn, error, fatal, severe
  • Valid colors: black, green, red, yellow, blue, magenta, cyan, white, brightblack, brightred, brightgreen, brightblue, brightyellow, brightmagenta, brightcyan, brightwhite

Launch the jboss cli cmd

  • on Linux jboss-cli.sh
  • on windows jboss-cli.bat

location : C:\FileLocation\wildfly-17.0.0.Final\wildfly-17.0.0.Final\bin

then enter this cmd :

logging/pattern-formatter=PATTERN_FORMATTER_NAME:write-attribute(name=color-map,value="LEVEL:COLOR,LEVEL:COLOR")

source



来源:https://stackoverflow.com/questions/59006162/how-to-color-the-log-of-wildfly-jboss-server-console-on-eclipse

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!