如何为Wildfly的日志着色-Eclipse上的Jboss Server控制台 [英] how to color the log of Wildfly - Jboss Server console on Eclipse
问题描述
我正在使用服务器 Wildfly版本18.0.0 ,并且我想在开始使用Eclipse作为IDE时为服务器的日志着色. 就像tomcat服务器警告,信息....该怎么做?
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?
推荐答案
在Eclipse控制台中为Wildfly日志着色:
-
在控制台中安装 ANSI Escape 来自Eclipse Marketplace的插件: https://marketplace.eclipse.org/content/ansi-escape-console
Install the ANSI Escape in Console plugin from the Eclipse Marketplace : https://marketplace.eclipse.org/content/ansi-escape-console
您可能必须从Wildfly服务器启动配置中删除-Dorg.jboss.logmanager.nocolor=true
VM参数.
要删除它,您:
You may have to remove the -Dorg.jboss.logmanager.nocolor=true
VM argument from Wildfly server launch configuration.
To remove it you:
- 转到服务器" 标签
- 右键单击Wildlfy服务器
- 选择
Open
菜单项 - 在显示的概述选项卡的常规信息部分中,单击打开启动配置
- 在编辑配置对话框中,编辑 VM参数以删除
-Dorg.jboss.logmanager.nocolor=true
参数. - 应用 + 确定
- Go to the "Servers" tab
- Right click on the Wildlfy server
- Select
Open
menu entry - In the displayed Overview tab, section General information, click on Open launch configuration
- In the Edit Configuration dialog, edit the VM arguments to remove
-Dorg.jboss.logmanager.nocolor=true
argument. - Apply + OK
关于颜色映射:
默认颜色映射如下:
About the color mapping :
The default color mapping is as follow:
- 错误:暗红色
- 警告:黄色
- 信息:清除
- 调试:绿色
其中给出了语法error:darkred,warn:yellow,info:clear,debug:green
.
The default color mapping is set in the org.jboss.logmanager.formatters.ColorMap
class.
这篇关于如何为Wildfly的日志着色-Eclipse上的Jboss Server控制台的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!