Karaf no longer logs when log line has trailing whitespace

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Karaf no longer logs when log line has trailing whitespace

Fabian Lange
Hi,

when you download the karaf distribution,
then change this log line:

log4j2.rootLogger.level = INFO

so that it ends with a trailing whitespace

then karaf will not log when you start it.

Is that a pax-logging or a karaf bug?

With 4.0.x trailing whitspace was trimmed.

Fabian
--
Fabian Lange | Performance Expert
mobil: +49 (0) 160.3673393

codecentric AG | Hochstraße 11 | 42697 Solingen | Deutschland

Sitz der Gesellschaft: Solingen | HRB 25917| Amtsgericht Wuppertal
Vorstand: Michael Hochgürtel . Mirko Novakovic . Rainer Vehns
Aufsichtsrat: Patric Fedlmeier (Vorsitzender) . Klaus Jäger . Jürgen Schütz
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Karaf no longer logs when log line has trailing whitespace

Guillaume Nodet-2
This may be the way log4j2 configuration works.  I don't think Karaf is
involved directly here, but it may be possible to trim the properties in
pax-logging before handing them to log4j.

2017-03-08 23:51 GMT+01:00 Fabian Lange <[hidden email]>:

> Hi,
>
> when you download the karaf distribution,
> then change this log line:
>
> log4j2.rootLogger.level = INFO
>
> so that it ends with a trailing whitespace
>
> then karaf will not log when you start it.
>
> Is that a pax-logging or a karaf bug?
>
> With 4.0.x trailing whitspace was trimmed.
>
> Fabian
> --
> Fabian Lange | Performance Expert
> mobil: +49 (0) 160.3673393
>
> codecentric AG | Hochstraße 11 | 42697 Solingen | Deutschland
>
> Sitz der Gesellschaft: Solingen | HRB 25917| Amtsgericht Wuppertal
> Vorstand: Michael Hochgürtel . Mirko Novakovic . Rainer Vehns
> Aufsichtsrat: Patric Fedlmeier (Vorsitzender) . Klaus Jäger . Jürgen Schütz
>



--
------------------------
Guillaume Nodet
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Karaf no longer logs when log line has trailing whitespace

Matt Sicker
That's most likely just how the Properties class handles properties files.
Could you file an issue at log4j?
https://issues.apache.org/jira/browse/LOG4J2/

On 9 March 2017 at 01:07, Guillaume Nodet <[hidden email]> wrote:

> This may be the way log4j2 configuration works.  I don't think Karaf is
> involved directly here, but it may be possible to trim the properties in
> pax-logging before handing them to log4j.
>
> 2017-03-08 23:51 GMT+01:00 Fabian Lange <[hidden email]>:
>
> > Hi,
> >
> > when you download the karaf distribution,
> > then change this log line:
> >
> > log4j2.rootLogger.level = INFO
> >
> > so that it ends with a trailing whitespace
> >
> > then karaf will not log when you start it.
> >
> > Is that a pax-logging or a karaf bug?
> >
> > With 4.0.x trailing whitspace was trimmed.
> >
> > Fabian
> > --
> > Fabian Lange | Performance Expert
> > mobil: +49 (0) 160.3673393
> >
> > codecentric AG | Hochstraße 11 | 42697 Solingen | Deutschland
> >
> > Sitz der Gesellschaft: Solingen | HRB 25917| Amtsgericht Wuppertal
> > Vorstand: Michael Hochgürtel . Mirko Novakovic . Rainer Vehns
> > Aufsichtsrat: Patric Fedlmeier (Vorsitzender) . Klaus Jäger . Jürgen
> Schütz
> >
>
>
>
> --
> ------------------------
> Guillaume Nodet
>



--
Matt Sicker <[hidden email]>
Loading...