[ 
https://issues.apache.org/jira/browse/KARAF-7029?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jean-Baptiste Onofré reassigned KARAF-7029:
-------------------------------------------

    Assignee: Jean-Baptiste Onofré

> 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
>            Assignee: Jean-Baptiste Onofré
>            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)

Reply via email to