Custom plugins not getting applied in OSGi environment

2017-07-17 Thread Asma Zinneera Jabir
I have written a Log4j2 custom Converter plugin in OSGi environment and have used log4j2 with ops4j-pax-logging. The custom field is tenantId and I have referred to it in the log4j2.xml as %tenantId. When I run the program the logs gets printed as {thread-name}enantId. Plugin class package com.te

Re: plugins

2015-08-28 Thread Remko Popma
n answer to #1 below. > Can someone answer that for me so that I can code appropriately? > > Thanks, > Nick > >> From: nic...@msn.com >> To: log4j-user@logging.apache.org >> Subject: plugins >> Date: Thu, 27 Aug 2015 14:51:58 -0400 >> >> &g

Re: plugins

2015-08-27 Thread Ralph Goers
printObject affects the way plugins are logged when you have status=debug enabled. If you set printObject to true then the Plugin’s toString method will be called to log the Plugin’s “name”. Usually, this is just the SimpleClassName, but if the class name doesn’t match the Plugin name it can

RE: plugins

2015-08-27 Thread Nicholas Duane
While I got my LevelRangeFilter working I didn't get an answer to #1 below. Can someone answer that for me so that I can code appropriately? Thanks, Nick > From: nic...@msn.com > To: log4j-user@logging.apache.org > Subject: plugins > Date: Thu, 27 Aug 2015 14:51:58 -0400 &

RE: plugins

2015-08-27 Thread Nicholas Duane
I can filter on just a single level with my LevelRangeFilter. Thanks for all the help. Next I have to get the latest log4j installed on fedora 21 so that I can verify custom levels work. Nick > Date: Fri, 28 Aug 2015 07:51:32 +0900 > Subject: Re: plugins > From: remko.po...@gmail

Re: plugins

2015-08-27 Thread Remko Popma
still doesn't work. > > Thanks, > Nick > > > Subject: Re: plugins > > From: remko.po...@gmail.com > > Date: Fri, 28 Aug 2015 07:25:35 +0900 > > To: log4j-user@logging.apache.org > > > > Perhaps the simplest thing to do is to add the packages attr

RE: plugins

2015-08-27 Thread Nicholas Duane
I tried that. I created a jar, I think correctly, from my LevelRangeFilter.class file. I added that to the packages attribute, as you can see in the config I previously sent. It still doesn't work. Thanks, Nick > Subject: Re: plugins > From: remko.po...@gmail.com > Date: Fr

Re: plugins

2015-08-27 Thread Remko Popma
n my program I'm seeing the following error from log4net: > > 2015-08-27 15:23:09,682 ERROR File contains an invalid element or attribute > "LevelRangeFilter" > > Here is my config: > > > > > > > > > > >

RE: plugins

2015-08-27 Thread Nicholas Duane
gram I'm seeing the following error from log4net: 2015-08-27 15:23:09,682 ERROR File contains an invalid element or attribute "LevelRangeFilter" Here is my config: %d %p %c{1.} [%t] %m%n

Re: plugins

2015-08-27 Thread Ralph Goers
omments I assume one would show up out-of-the-box at > some point. Of course I need mine now so unfortunately I have to write one. > > Any input on my questions below? > > Thanks, > Nick > >> Date: Thu, 27 Aug 2015 12:20:07 -0700 >> Subject: Re: plugins >>

RE: plugins

2015-08-27 Thread Nicholas Duane
Based on your previous comments I assume one would show up out-of-the-box at some point. Of course I need mine now so unfortunately I have to write one. Any input on my questions below? Thanks, Nick > Date: Thu, 27 Aug 2015 12:20:07 -0700 > Subject: Re: plugins > From:

Re: plugins

2015-08-27 Thread Gary Gregory
Note that I wrote such a filter, which is under review ATM here: - https://issues.apache.org/jira/browse/LOG4J2-1106 - https://issues.apache.org/jira/browse/LOG4J2-1105 Gary On Thu, Aug 27, 2015 at 11:51 AM, Nicholas Duane wrote: > > > > I've got a couple questions rega

plugins

2015-08-27 Thread Nicholas Duane
I've got a couple questions regarding plugins I'm hoping someone might be able to help me with. I checked the docs and it's still not quite clear. 1. I'm unsure what to set printObject to in my Plugin annotation. From http://logging.apache.org/log4j/2.x/manual/ex

AW: Log4J2 with custom Plugins and Java Web Start

2013-10-25 Thread Alexander.Rathai
Hi again, this is all I could come up with. I can't find another way but reflection atm. This is so ugly. But it works. Your thoughts on this? Index: src/main/java/org/apache/logging/log4j/core/config/plugins/ResolverUtil

Log4J2 with custom Plugins and Java Web Start

2013-10-24 Thread Alexander.Rathai
Hi, I've got an Application that is deployed via Java Web Start. I also have custom @Plugin(s) i.e. a LogEventPatternConverter. Log4j2 picks the packages directive of the config but fails to collect the plugins when started via Web Start. 2013-10-24 13:49:29,617 DEBUG Found Plugin M

Re: BaseConfiguration ignores custom "Lookup" plugins?

2013-08-19 Thread Ralph Goers
t;> that some variable substitution is possible on the attributes on the >> Configuration element. Until the packages attribute is handled custom >> lookups won't be found. Your custom Lookups should work for other elements >> in the configuration. I'd like t

Re: BaseConfiguration ignores custom "Lookup" plugins?

2013-08-19 Thread David Nault
Until the packages attribute is handled custom lookups > won't be found. Your custom Lookups should work for other elements in the > configuration. I'd like to see your Lookup to see if it could be included as > one of the hard-wired plugins. > > Ralph > > On Aug 16,

Re: BaseConfiguration ignores custom "Lookup" plugins?

2013-08-19 Thread David Nault
> >>> >> Any config item that is annotated with Log4j annotations has to be part of >> Log4J's config dat file. I'm not not 100% sure, but I think you might have >> to regenerate Log4J's config dat file. There might be a way to scan the CP >>

Re: BaseConfiguration ignores custom "Lookup" plugins?

2013-08-16 Thread Ralph Goers
n the configuration. I'd like to see your Lookup to see if it could be included as one of the hard-wired plugins. Ralph On Aug 16, 2013, at 3:21 PM, David Nault wrote: > Hi All, > > We're using Log4j in a webapp and are looking at migrating to Log4j 2. > > We'

Re: BaseConfiguration ignores custom "Lookup" plugins?

2013-08-16 Thread Gary Gregory
On Fri, Aug 16, 2013 at 7:54 PM, Gary Gregory wrote: > On Fri, Aug 16, 2013 at 6:21 PM, David Nault > wrote: > >> Hi All, >> >> We're using Log4j in a webapp and are looking at migrating to Log4j 2. >> >> We'd like to continue writing our log files to a location under the >> webapp's context root

Re: BaseConfiguration ignores custom "Lookup" plugins?

2013-08-16 Thread Gary Gregory
On Fri, Aug 16, 2013 at 6:21 PM, David Nault wrote: > Hi All, > > We're using Log4j in a webapp and are looking at migrating to Log4j 2. > > We'd like to continue writing our log files to a location under the > webapp's context root -- that is, under the directory returned by > ServletContext.getR

BaseConfiguration ignores custom "Lookup" plugins?

2013-08-16 Thread David Nault
Hi All, We're using Log4j in a webapp and are looking at migrating to Log4j 2. We'd like to continue writing our log files to a location under the webapp's context root -- that is, under the directory returned by ServletContext.getRealPath("/"). This works very well in our QA environment where

Re: Are the custom appenders only like plugins?

2013-07-30 Thread Remko Popma
Sorry for being unclear. I've explained it better in this Jira comment: https://issues.apache.org/jira/browse/LOG4J2-232?focusedCommentId=13648502&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13648502

Re: Are the custom appenders only like plugins?

2013-07-30 Thread Ralph Goers
From: Remko Popma [mailto:rem...@yahoo.com] > Sent: Tuesday, July 30, 2013 2:09 PM > To: Log4J-Users List > Subject: Re: Are the custom appenders only like plugins? > > I see... Did you try pre-building the binary file with plugin descriptors >

RE: Are the custom appenders only like plugins?

2013-07-30 Thread Aliaksandr Belavusau
Sorry, Do you mean binary file of my custom appender? -Original Message- From: Remko Popma [mailto:rem...@yahoo.com] Sent: Tuesday, July 30, 2013 2:09 PM To: Log4J-Users List Subject: Re: Are the custom appenders only like plugins? I see... Did you try pre-building the binary file with

Re: Are the custom appenders only like plugins?

2013-07-30 Thread Remko Popma
I see... Did you try pre-building the binary file with plugin descriptors using the PluginManager main method?

RE: Are the custom appenders only like plugins?

2013-07-30 Thread Aliaksandr Belavusau
4.2.0 in my OSGi application. Any thoughs? -Original Message- From: Remko Popma [mailto:rem...@yahoo.com] Sent: Tuesday, July 30, 2013 2:03 AM To: Log4J Users List Subject: Re: Are the custom appenders only like plugins? Aliaksandr, I don't think you need a specific OSGi version

Re: Are the custom appenders only like plugins?

2013-07-29 Thread Remko Popma
Aliaksandr, I don't think you need a specific OSGi version to make a plugin. Remko From: Aliaksandr Belavusau To: log4j-user@logging.apache.org Sent: Tuesday, July 30, 2013 5:27 AM Subject: Are the custom appenders only like plugins? Hi Guys, T

Are the custom appenders only like plugins?

2013-07-29 Thread Aliaksandr Belavusau
Hi Guys, Trying embed log4j2 in our OSGi application. So, one small question: How can I create custom appender which will be not a plugin? I want to create it like old school log4j1.x appender. The cause: We cannot use osgi.core version >= 4.3.0 in our application, only =4.2.0. (As you know 4

Are the custom appenders only like plugins?

2013-07-29 Thread Aliaksandr Belavusau
Hi Guys, Trying to embed log4j2 in our OSGi application. So, one small question: How can I create custom appender which will be *not* a plugin? I want to create it like old school log4j1.x appender. For the some reason we can not use osgi.core version >= 4.3.0 in our application, only =4.2.0.