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 tomca
Install the ANSI Escape in Console plugin from the Eclipse Marketplace : https://marketplace.eclipse.org/content/ansi-escape-console
You may have to remove the -Dorg.jboss.logmanager.nocolor=true
VM argument from Wildfly server launch configuration.
To remove it you:
Open
menu entry-Dorg.jboss.logmanager.nocolor=true
argument.The default color mapping is as follow:
Which gives the syntax error:darkred,warn:yellow,info:clear,debug:green
.
The default color mapping is set in the org.jboss.logmanager.formatters.ColorMap class.
You can define a color map to assign a color to different log levels.
The format is a comma-separated list of LEVEL:COLOR
.
Launch the jboss cli cmd
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