You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@karaf.apache.org by Arunan Balasubramaniam <ar...@interlinksoftware.com> on 2017/05/22 13:32:57 UTC

Half patch for logging documentation

Hi,

the user documentation still refers to configuring logging using log4j(1) while Karaf has moved on to log4j2. I started updating the documentation but did not feel confident changing anything from the "Advanced configuration" stage towards the bottom of the documentation. The changes I made up to that point are available at https://github.com/NetNow/karaf/commit/e0a592117bb259833f8500c6c534c2f1deb13d22 in case they are of use; but if that commit were applied as-is, the manual would have instructions for both log4j and log4j2 configuration in it which is possibly worse than now.

By the way, the file etc/org.ops4j.pax.logging.cfg has a few log4j(1) properties left in but commented out at the bottom.

Regards,
Arunan

RE: Half patch for logging documentation

Posted by Arunan Balasubramaniam <ar...@interlinksoftware.com>.
Hi Matt,

You don’t always need to specify a context prefix - https://logging.apache.org/log4j/2.x/manual/configuration.html#PropertySubstitution hence all the ${karaf.foo} ones etc are fine as are the locally defined properties like ${log4j2.pattern}. It would be good to document what properties are in the default context but I don't actually know what the answer to that one is!

Cheers,
Arunan


-----Original Message-----
From: Matt Sicker [mailto:boards@gmail.com] 
Sent: 22 May 2017 17:05
To: Karaf Developers List <de...@karaf.apache.org>
Subject: Re: Half patch for logging documentation

I think you need to specify which lookup to use in ${placeholder} things in the log4j2 properties file example. For example: ${sys:foo.bar} for the foo.bar system property. < https://logging.apache.org/log4j/2.x/manual/lookups.html>

I'm not sure what happens when you don't use a prefix as it's not clearly documented.

On 22 May 2017 at 08:32, Arunan Balasubramaniam < arunan.balasubramaniam@interlinksoftware.com> wrote:

>
> Hi,
>
> the user documentation still refers to configuring logging using 
> log4j(1) while Karaf has moved on to log4j2. I started updating the 
> documentation but did not feel confident changing anything from the 
> "Advanced configuration" stage towards the bottom of the 
> documentation. The changes I made up to that point are available at 
> https://github.com/NetNow/
> karaf/commit/e0a592117bb259833f8500c6c534c2f1deb13d22 in case they are 
> of use; but if that commit were applied as-is, the manual would have 
> instructions for both log4j and log4j2 configuration in it which is 
> possibly worse than now.
>
> By the way, the file etc/org.ops4j.pax.logging.cfg has a few log4j(1) 
> properties left in but commented out at the bottom.
>
> Regards,
> Arunan
>



--
Matt Sicker <bo...@gmail.com>

Re: Half patch for logging documentation

Posted by Matt Sicker <bo...@gmail.com>.
I think you need to specify which lookup to use in ${placeholder} things in
the log4j2 properties file example. For example: ${sys:foo.bar} for the
foo.bar system property. <
https://logging.apache.org/log4j/2.x/manual/lookups.html>

I'm not sure what happens when you don't use a prefix as it's not clearly
documented.

On 22 May 2017 at 08:32, Arunan Balasubramaniam <
arunan.balasubramaniam@interlinksoftware.com> wrote:

>
> Hi,
>
> the user documentation still refers to configuring logging using log4j(1)
> while Karaf has moved on to log4j2. I started updating the documentation
> but did not feel confident changing anything from the "Advanced
> configuration" stage towards the bottom of the documentation. The changes I
> made up to that point are available at https://github.com/NetNow/
> karaf/commit/e0a592117bb259833f8500c6c534c2f1deb13d22 in case they are of
> use; but if that commit were applied as-is, the manual would have
> instructions for both log4j and log4j2 configuration in it which is
> possibly worse than now.
>
> By the way, the file etc/org.ops4j.pax.logging.cfg has a few log4j(1)
> properties left in but commented out at the bottom.
>
> Regards,
> Arunan
>



-- 
Matt Sicker <bo...@gmail.com>

RE: Half patch for logging documentation

Posted by Arunan Balasubramaniam <ar...@interlinksoftware.com>.
  Hi JB,

  I have added the patch "so-far" to the Jira along with a link to the commit on Github. I have not made it a PR as it is only half done as I don't feel confident enough to update the "Advanced configuration" part of the manual.

  Cheers,
  Arunan


-----Original Message-----
From: Jean-Baptiste Onofré [mailto:jb@nanthrax.net] 
Sent: 23 May 2017 07:28
To: dev@karaf.apache.org
Subject: Re: Half patch for logging documentation

By the way, I created the Jira:

https://issues.apache.org/jira/browse/KARAF-5135

You can attach the patch/PR here.

Thanks !

Regards
JB

On 05/23/2017 08:24 AM, Jean-Baptiste Onofré wrote:
> Hi Arunan,
> 
> great,  can you please create a patch in  a Jira ? I will take a look.
> 
> By the way, I also moved forward on  the dev guide and the samples (on my github).
> 
> Thanks !
> Regards
> JB
> 
> On 05/22/2017 03:32 PM, Arunan Balasubramaniam wrote:
>>
>> Hi,
>>
>> the user documentation still refers to configuring logging using 
>> log4j(1) while Karaf has moved on to log4j2. I started updating the 
>> documentation but did not feel confident changing anything from the "Advanced configuration"
>> stage towards the bottom of the documentation. The changes I made up 
>> to that point are available at
>> https://github.com/NetNow/karaf/commit/e0a592117bb259833f8500c6c534c2
>> f1deb13d22 in case they are of use; but if that commit were applied 
>> as-is, the manual would have instructions for both log4j and log4j2 
>> configuration in it which is possibly worse than now.
>>
>> By the way, the file etc/org.ops4j.pax.logging.cfg has a few log4j(1) 
>> properties left in but commented out at the bottom.
>>
>> Regards,
>> Arunan
>>
> 

--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Half patch for logging documentation

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
By the way, I created the Jira:

https://issues.apache.org/jira/browse/KARAF-5135

You can attach the patch/PR here.

Thanks !

Regards
JB

On 05/23/2017 08:24 AM, Jean-Baptiste Onofré wrote:
> Hi Arunan,
> 
> great,  can you please create a patch in  a Jira ? I will take a look.
> 
> By the way, I also moved forward on  the dev guide and the samples (on my github).
> 
> Thanks !
> Regards
> JB
> 
> On 05/22/2017 03:32 PM, Arunan Balasubramaniam wrote:
>>
>> Hi,
>>
>> the user documentation still refers to configuring logging using log4j(1) 
>> while Karaf has moved on to log4j2. I started updating the documentation but 
>> did not feel confident changing anything from the "Advanced configuration" 
>> stage towards the bottom of the documentation. The changes I made up to that 
>> point are available at 
>> https://github.com/NetNow/karaf/commit/e0a592117bb259833f8500c6c534c2f1deb13d22 in 
>> case they are of use; but if that commit were applied as-is, the manual would 
>> have instructions for both log4j and log4j2 configuration in it which is 
>> possibly worse than now.
>>
>> By the way, the file etc/org.ops4j.pax.logging.cfg has a few log4j(1) 
>> properties left in but commented out at the bottom.
>>
>> Regards,
>> Arunan
>>
> 

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Half patch for logging documentation

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Arunan,

great,  can you please create a patch in  a Jira ? I will take a look.

By the way, I also moved forward on  the dev guide and the samples (on my github).

Thanks !
Regards
JB

On 05/22/2017 03:32 PM, Arunan Balasubramaniam wrote:
> 
> Hi,
> 
> the user documentation still refers to configuring logging using log4j(1) while Karaf has moved on to log4j2. I started updating the documentation but did not feel confident changing anything from the "Advanced configuration" stage towards the bottom of the documentation. The changes I made up to that point are available at https://github.com/NetNow/karaf/commit/e0a592117bb259833f8500c6c534c2f1deb13d22 in case they are of use; but if that commit were applied as-is, the manual would have instructions for both log4j and log4j2 configuration in it which is possibly worse than now.
> 
> By the way, the file etc/org.ops4j.pax.logging.cfg has a few log4j(1) properties left in but commented out at the bottom.
> 
> Regards,
> Arunan
> 

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com