如何为Wildfly的日志着色-Eclipse上的Jboss Server控制台 [英] how to color the log of Wildfly - Jboss Server console on Eclipse

查看:128
本文介绍了如何为Wildfly的日志着色-Eclipse上的Jboss Server控制台的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用服务器 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日志着色:

  1. 在控制台中安装 ANSI Escape 来自Eclipse Marketplace的插件: https://marketplace.eclipse.org/content/ansi-escape-console

  1. 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:

  1. 转到服务器" 标签
  2. 右键单击Wildlfy服务器
  3. 选择Open菜单项
  4. 在显示的概述选项卡的常规信息部分中,单击打开启动配置
  5. 编辑配置对话框中,编辑 VM参数以删除-Dorg.jboss.logmanager.nocolor=true参数.
  6. 应用 + 确定
  1. Go to the "Servers" tab
  2. Right click on the Wildlfy server
  3. Select Open menu entry
  4. In the displayed Overview tab, section General information, click on Open launch configuration
  5. In the Edit Configuration dialog, edit the VM arguments to remove -Dorg.jboss.logmanager.nocolor=true argument.
  6. 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆