You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Jörg Jansen <Jo...@inform-software.com> on 2021/12/22 14:43:01 UTC

apache-karaf with logback

Hi all, 

caused by the known log4j2 vulnerability, I tried to switch from log4j to logback. 
I've updated the startup.properties and pax-logging configuration file and at the first view it seems to work fine. 

Unfortunately, when running any log command within the shell (e.g. log:display) I receive an IllegalStateException with message "Unrecognized configuration".

Looking into the code, I could see, that the getDelegate onlyprovides log4j implementations. 

Is that a bug, which I should register in JIRA?
Does karaf support logback (as pax-logging do).

Used karaf version is 4.3.2.

Thanks for any comment,
Joerg


Re: apache-karaf with logback

Posted by Jean-Baptiste Onofre <jb...@nanthrax.net>.
Hi,

The Karaf log command (log:set, log:get, log:list, etc) assumes that you use log4j style configuration. It doesn’t support other configuration format.
However, you can still use log4j style configuration even if you use logback service.

If you want that log:* commands support logback style, then, ok to create a Jira (but IMHO it’s very low priority).

NB: logback has been also impacted by CVE ;) So worth to keep log4j2 with Karaf 4.3.4 at least ;)

Regards
JB

> Le 22 déc. 2021 à 15:43, Jörg Jansen <Jo...@inform-software.com> a écrit :
> 
> Hi all, 
> 
> caused by the known log4j2 vulnerability, I tried to switch from log4j to logback. 
> I've updated the startup.properties and pax-logging configuration file and at the first view it seems to work fine. 
> 
> Unfortunately, when running any log command within the shell (e.g. log:display) I receive an IllegalStateException with message "Unrecognized configuration".
> 
> Looking into the code, I could see, that the getDelegate onlyprovides log4j implementations. 
> 
> Is that a bug, which I should register in JIRA?
> Does karaf support logback (as pax-logging do).
> 
> Used karaf version is 4.3.2.
> 
> Thanks for any comment,
> Joerg
>