Re: KARAF 4.1.5 & pax-logging-service

2018-03-06 Thread Matt Sicker
The plugin docs for log4j2 itself [1] covers more about it. If you’re
trying to extend an existing appender, you’ll have to extend its
corresponding manager class instead (an appender in v2 is more of a
configuration mechanism while the manager handles the underlying data
sink). I’d also suggest discussing with the Apache list if you’d like to
integrate or request your feature upstream.

[1]: http://logging.apache.org/log4j/2.x/manual/plugins.html

On Tue, Mar 6, 2018 at 21:18, munishgupta.asr 
wrote:

> Hello JB,
>
> As you suggested and mentioned like that "If so, you should update your
> appender to log4j2 style and attach to pax-logging-log4j2".
>
> I was trying to do that but it seems creating custom appenders is very
> different here. earlier I was extending fileappenders and providing
> configuration parameters in constructor through CFG file. but now it looks
> very different.
>
> is there sample examples to refer about how to create custom file appenders
> and attach it with pax-logging-log4j2 as fragment?
>
> or is there any way to still use pax-logging-service with KARAF 4.1.x
> onwards as we are OK with log4j1 implementation.
>
> can you please help? kindly answer.
>
> Regards
> Munish
>
>
>
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html
>
-- 
Matt Sicker 


Re: KARAF 4.1.5 & pax-logging-service

2018-03-06 Thread munishgupta.asr
Hello JB,

As you suggested and mentioned like that "If so, you should update your
appender to log4j2 style and attach to pax-logging-log4j2".

I was trying to do that but it seems creating custom appenders is very
different here. earlier I was extending fileappenders and providing
configuration parameters in constructor through CFG file. but now it looks
very different. 

is there sample examples to refer about how to create custom file appenders
and attach it with pax-logging-log4j2 as fragment?

or is there any way to still use pax-logging-service with KARAF 4.1.x
onwards as we are OK with log4j1 implementation. 

can you please help? kindly answer.

Regards
Munish  



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html


Re: KARAF 4.1.5 & pax-logging-service

2018-03-05 Thread munishgupta.asr
Hi, 

Yes it looks creating a custom appender is very different with log4j2 and 
not like that with log4j1 where we were using pax-logging-service as 
fragment-host with our custom bundle. 
we don't have AppenderSkeleton class also here. 

how shall i approach it now? do we have any adapter kind of thing here to 
continue using same code or we will have to rewrite our logging module. 

Regards 
Munish 




--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html


Re: KARAF 4.1.5 & pax-logging-service

2018-03-05 Thread munishgupta.asr
Hi,

Yes it looks creating a custom appender is very different with log4j2 and
not like that with log4j1 where we were using pax-logging-service as
fragment-host with our custom bundle. 
we don't have AppenderSkeleton class also here.

how shall i approach it now? do we have any adapter kind of thing here to
continue using same code or we will have to rewrite our logging module.

Regards
Munish



Matt Sicker wrote
> If you have a custom log4j 1 appender, there's limited support in
> log4j-1.2-api which you can add on to the log4j2 stuff, though I'm not
> sure
> how that would interact without some fragment hackery.
> 
> On 2 March 2018 at 03:34, Jean-Baptiste Onofré 

> jb@

>  wrote:
> 
>> Thanks, please let me know if you have any issue.
>>
>> Regards
>> JB
>>
>> On 03/02/2018 10:33 AM, munishgupta.asr wrote:
>> > Thanks JB.
>> >
>> > I will try and get back with results.
>> >
>> > Regards
>> > Munish
>> >
>> >
>> >
>> > --
>> > Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html
>> >
>>
>> --
>> Jean-Baptiste Onofré
>> 

> jbonofre@

>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
> 
> 
> 
> -- 
> Matt Sicker 

> boards@

> 


Matt Sicker wrote
> If you have a custom log4j 1 appender, there's limited support in
> log4j-1.2-api which you can add on to the log4j2 stuff, though I'm not
> sure
> how that would interact without some fragment hackery.
> 
> On 2 March 2018 at 03:34, Jean-Baptiste Onofré 

> jb@

>  wrote:
> 
>> Thanks, please let me know if you have any issue.
>>
>> Regards
>> JB
>>
>> On 03/02/2018 10:33 AM, munishgupta.asr wrote:
>> > Thanks JB.
>> >
>> > I will try and get back with results.
>> >
>> > Regards
>> > Munish
>> >
>> >
>> >
>> > --
>> > Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html
>> >
>>
>> --
>> Jean-Baptiste Onofré
>> 

> jbonofre@

>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
> 
> 
> 
> -- 
> Matt Sicker 

> boards@

> 


Matt Sicker wrote
> If you have a custom log4j 1 appender, there's limited support in
> log4j-1.2-api which you can add on to the log4j2 stuff, though I'm not
> sure
> how that would interact without some fragment hackery.
> 
> On 2 March 2018 at 03:34, Jean-Baptiste Onofré 

> jb@

>  wrote:
> 
>> Thanks, please let me know if you have any issue.
>>
>> Regards
>> JB
>>
>> On 03/02/2018 10:33 AM, munishgupta.asr wrote:
>> > Thanks JB.
>> >
>> > I will try and get back with results.
>> >
>> > Regards
>> > Munish
>> >
>> >
>> >
>> > --
>> > Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html
>> >
>>
>> --
>> Jean-Baptiste Onofré
>> 

> jbonofre@

>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
> 
> 
> 
> -- 
> Matt Sicker 

> boards@

> 


Matt Sicker wrote
> If you have a custom log4j 1 appender, there's limited support in
> log4j-1.2-api which you can add on to the log4j2 stuff, though I'm not
> sure
> how that would interact without some fragment hackery.
> 
> On 2 March 2018 at 03:34, Jean-Baptiste Onofré 

> jb@

>  wrote:
> 
>> Thanks, please let me know if you have any issue.
>>
>> Regards
>> JB
>>
>> On 03/02/2018 10:33 AM, munishgupta.asr wrote:
>> > Thanks JB.
>> >
>> > I will try and get back with results.
>> >
>> > Regards
>> > Munish
>> >
>> >
>> >
>> > --
>> > Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html
>> >
>>
>> --
>> Jean-Baptiste Onofré
>> 

> jbonofre@

>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
> 
> 
> 
> -- 
> Matt Sicker 

> boards@

> 


Matt Sicker wrote
> If you have a custom log4j 1 appender, there's limited support in
> log4j-1.2-api which you can add on to the log4j2 stuff, though I'm not
> sure
> how that would interact without some fragment hackery.
> 
> On 2 March 2018 at 03:34, Jean-Baptiste Onofré 

> jb@

>  wrote:
> 
>> Thanks, please let me know if you have any issue.
>>
>> Regards
>> JB
>>
>> On 03/02/2018 10:33 AM, munishgupta.asr wrote:
>> > Thanks JB.
>> >
>> > I will try and get back with results.
>> >
>> > Regards
>> > Munish
>> >
>> >
>> >
>> > --
>> > Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html
>> >
>>
>> --
>> Jean-Baptiste Onofré
>> 

> jbonofre@

>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
> 
> 
> 
> -- 
> Matt Sicker 

> boards@

> 


Matt Sicker wrote
> If you have a custom log4j 1 appender, there's limited support in
> log4j-1.2-api which you can add on to the log4j2 stuff, though I'm not
> sure
> how that would interact without some fragment hackery.
> 
> On 2 March 2018 at 03:34, Jean-Baptiste Onofré 

> jb@

>  wrote:
> 
>> Thanks, please let me know if you have any issue.
>>
>> Regards
>> JB
>>
>> On 03/02/2018 10:33 AM, munishgupta.asr wrote:
>> > Thanks JB.
>> >
>> > I will try and get back with results.
>> >
>> > Regards
>> > Munish
>> >
>> >
>> >
>> > --
>> > Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html
>> >
>>
>> --
>> Jean-Baptiste Onofré
>> 

> jbonofre@

>> 

Re: KARAF 4.1.5 & pax-logging-service

2018-03-02 Thread Matt Sicker
If you have a custom log4j 1 appender, there's limited support in
log4j-1.2-api which you can add on to the log4j2 stuff, though I'm not sure
how that would interact without some fragment hackery.

On 2 March 2018 at 03:34, Jean-Baptiste Onofré  wrote:

> Thanks, please let me know if you have any issue.
>
> Regards
> JB
>
> On 03/02/2018 10:33 AM, munishgupta.asr wrote:
> > Thanks JB.
> >
> > I will try and get back with results.
> >
> > Regards
> > Munish
> >
> >
> >
> > --
> > Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html
> >
>
> --
> Jean-Baptiste Onofré
> jbono...@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>



-- 
Matt Sicker 


Re: KARAF 4.1.5 & pax-logging-service

2018-03-02 Thread munishgupta.asr
Thanks JB.

I will try and get back with results.

Regards
Munish 



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html


Re: KARAF 4.1.5 & pax-logging-service

2018-03-02 Thread Jean-Baptiste Onofré
Thanks, please let me know if you have any issue.

Regards
JB

On 03/02/2018 10:33 AM, munishgupta.asr wrote:
> Thanks JB.
> 
> I will try and get back with results.
> 
> Regards
> Munish 
> 
> 
> 
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html
> 

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


Re: KARAF 4.1.5 & pax-logging-service

2018-03-02 Thread Jean-Baptiste Onofré
Hi,

no need to deal with logback (that's another layer).

Correct for log4j2 attachment & style.

Regards
JB

On 03/02/2018 10:20 AM, munishgupta.asr wrote:
> Thanks for the quick response.
> 
> we are extending the  org.apache.log4j.FileAppender and
> org.apache.log4j.nt.NTEventLogAppender.
> for now, my fragment pom file is using service as host bundle. 
> 
>   
> ${project.artifactId}
>
> ${project.groupId}.${project.artifactId}
> ${project.version}
> com.good.gcs.core.logging
> !*
>
> org.ops4j.pax.logging.pax-logging-service
> <_failok>true
>   
> 
> 
> 
> So that means I should update my fragment-host to "pax-logging-log4j2" and
> updated appender to log4j2 style?
> 
> what is the use of pax-logging-logback? Do i need to do anything with that
> also? 
> 
> 
> 
> 
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html
> 

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


Re: KARAF 4.1.5 & pax-logging-service

2018-03-02 Thread munishgupta.asr
Thanks for the quick response.

we are extending the  org.apache.log4j.FileAppender and
org.apache.log4j.nt.NTEventLogAppender.
for now, my fragment pom file is using service as host bundle. 

  
${project.artifactId}
   
${project.groupId}.${project.artifactId}
${project.version}
com.good.gcs.core.logging
!*
   
org.ops4j.pax.logging.pax-logging-service
<_failok>true
  



So that means I should update my fragment-host to "pax-logging-log4j2" and
updated appender to log4j2 style?

what is the use of pax-logging-logback? Do i need to do anything with that
also? 




--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html


Re: KARAF 4.1.5 & pax-logging-service

2018-03-02 Thread Jean-Baptiste Onofré
Hi,

As we switched to log4j2 configuration style, we now use pax-logging-log4j2.

pax-logging-log4j2 replaces the pax-logging-service (log4j1 style)
implementation of pax-logging-api.

I guess you use a fragment to use a log4j appender ?

If so, you should update your appender to log4j2 style and attach to
pax-logging-log4j2.
Even better is to implement your PaxAppender (based on the pax-logging-api).

Regards
JB

On 03/02/2018 09:58 AM, munishgupta.asr wrote:
> Hi All,
> 
> for our project, we are using KARAF 4.0.9 for now and decided to upgrade it
> to 4.1.5.
> we have a customer appender which is used as a fragment with
> pax-logging-service bundle. 
> 
> After upgrading to KARAF 4.1.5, it is failing to find pax-logging-service
> and service is not getting downloaded in system folder using maven.  rather
> I could see 2 different folders in system path.
> Pax-logging-logback
> pax-logging-log4j2
> 
> have we removed support of pax-logging-service with KARAF 4.1.x onwards.
> What shall i use now as fragment-host bundle to get the build generated?
> 
> Regards
> 
> Munish 
> 
> 
> 
> 
> 
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html
> 

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


KARAF 4.1.5 & pax-logging-service

2018-03-02 Thread munishgupta.asr
Hi All,

for our project, we are using KARAF 4.0.9 for now and decided to upgrade it
to 4.1.5.
we have a customer appender which is used as a fragment with
pax-logging-service bundle. 

After upgrading to KARAF 4.1.5, it is failing to find pax-logging-service
and service is not getting downloaded in system folder using maven.  rather
I could see 2 different folders in system path.
Pax-logging-logback
pax-logging-log4j2

have we removed support of pax-logging-service with KARAF 4.1.x onwards.
What shall i use now as fragment-host bundle to get the build generated?

Regards

Munish 





--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html