You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Jean-Baptiste Onofré (Jira)" <ji...@apache.org> on 2021/02/05 15:53:00 UTC

[jira] [Commented] (KARAF-7029) Karaf console colors are broken

    [ https://issues.apache.org/jira/browse/KARAF-7029?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17279765#comment-17279765 ] 

Jean-Baptiste Onofré commented on KARAF-7029:
---------------------------------------------

What's the value of {{TERM}} ? (and system) ?

Do you have any change in {{etc/shell.init.script}} ?

It's highly possible that {{$.jline.terminal}} doesn't return a {{max_colors}}.

> 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
>            Priority: Minor
>
> 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
>  
> Edit:
> I didn't think about dependency version mismatches between the main branch and our forked branch, so if this is working for you then please point at a potential problem we can also fix on the forked branch.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)