You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Vassil Zorev (Jira)" <ji...@apache.org> on 2021/02/05 15:43:00 UTC
[jira] [Created] (KARAF-7029) Karaf console colors are broken
Vassil Zorev created KARAF-7029:
-----------------------------------
Summary: Karaf console colors are broken
Key: KARAF-7029
URL: https://issues.apache.org/jira/browse/KARAF-7029
Project: Karaf
Issue Type: Bug
Components: karaf
Affects Versions: 4.3.0
Environment: Windows 10 Pro
java -version
openjdk version "11.0.10" 2021-01-19 LTS
OpenJDK Runtime Environment Zulu11.45+28-SA (build 11.0.10+9-LTS)
OpenJDK 64-Bit Server VM Zulu11.45+28-SA (build 11.0.10+9-LTS, mixed mode)
Reporter: Vassil Zorev
Hi,
In my company we work with Karaf for some time now and recently i got a karaf update on my system. It's currently version 4.3.0.SEE2 (we have forked the main repository, but i expect it is close enough to the official 4.3.0). Also I checked the sources in the master branch and they are the same in the relevant place so i would expect the bug is on the master as well. But on to the point.
The karaf console => log:tail is no longer colored, but all white. I checked my org.apache.karaf.log.cfg file and there is no '--no-color' property there. So i debugged a bit org.apache.karaf.log.core.internal.LogEventFormatterImpl.getColor(PaxLoggingEvent, boolean) and found an issue there.
return level2Color.get(event.getLevel());
the map key is of type org.osgi.service.log.LogLevel, while event.getLevel() is of type org.ops4j.pax.logging.spi.PaxLevel (incompatible). So for testing purposes i changed to return level2Color.get(event.getLevel().toLevel()); (which is the proper LogLevel type)
and the console was colored again.
I file this as minor although for me it is at least normal, i got very used to the color-coded log levels... :)
Please verify the proposed fix and consider applying it, it hopefully requires minimal verification and impact.
Thank you!
Regards,
Vassil Zorev
--
This message was sent by Atlassian Jira
(v8.3.4#803005)