Fwd: Two Question for NoSql MongoDB appender

2013-08-14 Thread YuCheng Ting
Hi all, I use *beta8 *log4j2 and wrote log4j2.xml like example in document ( http://logging.apache.org/log4j/2.x/manual/appenders.html#NoSQLAppender ): *appenders NoSql name=databaseAppender MongoDb databaseName=applicationDb collectionName=applicationLog

[jira] [Commented] (LOG4J2-345) logging.log4j-1.2-api doesn't export the log4j API 1.2. Dependent bundles can not be resolved.

2013-08-14 Thread Roland Weiglhofer (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13739361#comment-13739361 ] Roland Weiglhofer commented on LOG4J2-345: -- Hi, I changed the poms and I created

[jira] [Commented] (LOG4J2-346) Cyclic dependency in OSGi-context. Apache Log4j SLF4J Binding - slf4j-api

2013-08-14 Thread Roland Weiglhofer (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13739360#comment-13739360 ] Roland Weiglhofer commented on LOG4J2-346: -- Hi, I changed the poms and I created

[jira] [Created] (LOG4J2-348) Java2 Security for OSGi Bundles

2013-08-14 Thread Roland Weiglhofer (JIRA)
Roland Weiglhofer created LOG4J2-348: Summary: Java2 Security for OSGi Bundles Key: LOG4J2-348 URL: https://issues.apache.org/jira/browse/LOG4J2-348 Project: Log4j 2 Issue Type:

[jira] [Updated] (LOG4J2-345) logging.log4j-1.2-api doesn't export the log4j API 1.2. Dependent bundles can not be resolved.

2013-08-14 Thread Roland Weiglhofer (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-345?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Roland Weiglhofer updated LOG4J2-345: - Attachment: log4j2-OSGi.patch logging.log4j-1.2-api doesn't export the log4j API

[jira] [Updated] (LOG4J2-346) Cyclic dependency in OSGi-context. Apache Log4j SLF4J Binding - slf4j-api

2013-08-14 Thread Roland Weiglhofer (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-346?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Roland Weiglhofer updated LOG4J2-346: - Attachment: log4j2-OSGi.patch Cyclic dependency in OSGi-context. Apache Log4j SLF4J

[jira] [Commented] (LOG4J2-315) Multiple threads logging to same AsyncAppender- Data Loss

2013-08-14 Thread Remko Popma (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13739399#comment-13739399 ] Remko Popma commented on LOG4J2-315: Yes. I'm still off work the rest of this week I

[jira] [Created] (LOG4J2-349) Integration Test for Log4j2-bundles

2013-08-14 Thread Roland Weiglhofer (JIRA)
Roland Weiglhofer created LOG4J2-349: Summary: Integration Test for Log4j2-bundles Key: LOG4J2-349 URL: https://issues.apache.org/jira/browse/LOG4J2-349 Project: Log4j 2 Issue Type: Test

[jira] [Updated] (LOG4J2-348) Java2 Security for OSGi Bundles

2013-08-14 Thread Roland Weiglhofer (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Roland Weiglhofer updated LOG4J2-348: - Description: OSGi defines permissions for bundles. Bundles should have only those

Re: Usage of generics in Appender

2013-08-14 Thread Nick Williams
Please hold off until the weekend if you can. I won't get a chance to look over it until then. Nick On Aug 14, 2013, at 3:32 AM, Remko Popma wrote: Patch looks nice. Much fewer raw type compiler warnings. Seems like a big improvement to me. A small improvement on the patch would be to

Re: Usage of generics in Appender

2013-08-14 Thread Remko Popma
I didn't mean to ask for more reviews for the patch (although always welcome of course), I just didn't want to modify many files without warning. Are you in the middle of a big work-in-progress? (And isn't it like 3 AM where you are? :-) Remko On Wednesday, August 14, 2013, Nick Williams wrote:

Re: Usage of generics in Appender

2013-08-14 Thread Nick Williams
4:30 a.m And I knew you weren't asking for reviews, but I would like to review it if that's okay. N On Aug 14, 2013, at 4:18 AM, Remko Popma wrote: I didn't mean to ask for more reviews for the patch (although always welcome of course), I just didn't want to modify many files without

[jira] [Created] (LOG4J2-350) New attributes to be added in Log4j manifest

2013-08-14 Thread Himanshu Gusain (JIRA)
Himanshu Gusain created LOG4J2-350: -- Summary: New attributes to be added in Log4j manifest Key: LOG4J2-350 URL: https://issues.apache.org/jira/browse/LOG4J2-350 Project: Log4j 2 Issue Type:

[jira] [Commented] (LOG4J2-336) AsyncLogger.log fail with NullPointerException after double reconfigure

2013-08-14 Thread Remko Popma (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-336?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13739580#comment-13739580 ] Remko Popma commented on LOG4J2-336: Andre, during a reconfigure, new Appenders and

Re: Need to add attribute to manifest file of log4j-1.2.8.jar

2013-08-14 Thread Gary Gregory
Once released, the files in a release are immutable. Only a new release can modify them. Whether or not the change you request is appropriate is a different question. You can always download the source, modify, and build yourself of course. Gary On Aug 14, 2013, at 1:11, Himanshu Gusain -X

[jira] [Resolved] (LOG4J2-336) AsyncLogger.log fail with NullPointerException after double reconfigure

2013-08-14 Thread Remko Popma (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-336?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Remko Popma resolved LOG4J2-336. Resolution: Fixed Fix Version/s: 2.0-beta9 Fixed in revision 1513832. Please verify and

[jira] [Commented] (LOG4J2-336) AsyncLogger.log fail with NullPointerException after double reconfigure

2013-08-14 Thread Remko Popma (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-336?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13739604#comment-13739604 ] Remko Popma commented on LOG4J2-336: Andre, one reason I can see is that it is

Re: Usage of generics in Appender

2013-08-14 Thread Gary Gregory
On Wed, Aug 14, 2013 at 4:32 AM, Remko Popma remko.po...@gmail.com wrote: Patch looks nice. Much fewer raw type compiler warnings. Seems like a big improvement to me. A small improvement on the patch would be to remove the (now unnecessary) @param T javadoc comments. I have that additional

[jira] [Created] (LOG4J2-351) [OSGi] wrong Fragment-Host in manifest files

2013-08-14 Thread Remko Popma (JIRA)
Remko Popma created LOG4J2-351: -- Summary: [OSGi] wrong Fragment-Host in manifest files Key: LOG4J2-351 URL: https://issues.apache.org/jira/browse/LOG4J2-351 Project: Log4j 2 Issue Type: Bug

[jira] [Created] (LOG4J2-352) Dependency documentation

2013-08-14 Thread Roland Weiglhofer (JIRA)
Roland Weiglhofer created LOG4J2-352: Summary: Dependency documentation Key: LOG4J2-352 URL: https://issues.apache.org/jira/browse/LOG4J2-352 Project: Log4j 2 Issue Type: Documentation

[jira] [Updated] (LOG4J2-352) Dependency documentation

2013-08-14 Thread Roland Weiglhofer (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-352?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Roland Weiglhofer updated LOG4J2-352: - Description: The Log4j2-Core is a fragmented bundle. Apache Felix can not print

[jira] [Resolved] (LOG4J2-351) [OSGi] wrong Fragment-Host in manifest files

2013-08-14 Thread Remko Popma (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-351?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Remko Popma resolved LOG4J2-351. Resolution: Fixed Fixed in revision 1513877. Please verify and close. [OSGi]

[jira] [Commented] (LOG4J2-351) [OSGi] wrong Fragment-Host in manifest files

2013-08-14 Thread Remko Popma (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13739668#comment-13739668 ] Remko Popma commented on LOG4J2-351: Listing affected files for reference: commit -m

[jira] [Comment Edited] (LOG4J2-351) [OSGi] wrong Fragment-Host in manifest files

2013-08-14 Thread Remko Popma (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13739668#comment-13739668 ] Remko Popma edited comment on LOG4J2-351 at 8/14/13 1:42 PM: -

Re: Usage of generics in Appender

2013-08-14 Thread Remko Popma
Gary, The change only affects Appender, Layout is still generic. Appender does not need to be generic (it can just return a Layout? extends Serializable from its getLayout() method). This change does not introduce any type casts (afaics). Remko On Wed, Aug 14, 2013 at 10:11 PM, Gary Gregory

[jira] [Commented] (LOG4J2-336) AsyncLogger.log fail with NullPointerException after double reconfigure

2013-08-14 Thread Andre Bogus (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-336?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13739682#comment-13739682 ] Andre Bogus commented on LOG4J2-336: Wouldn't adding a default root logger into the

[jira] [Comment Edited] (LOG4J2-336) AsyncLogger.log fail with NullPointerException after double reconfigure

2013-08-14 Thread Andre Bogus (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-336?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13739682#comment-13739682 ] Andre Bogus edited comment on LOG4J2-336 at 8/14/13 2:03 PM: -

[jira] [Comment Edited] (LOG4J2-321) Provide configuration alternative to system properties

2013-08-14 Thread Remko Popma (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-321?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13739726#comment-13739726 ] Remko Popma edited comment on LOG4J2-321 at 8/14/13 2:41 PM: -

[jira] [Commented] (LOG4J2-321) Provide configuration alternative to system properties

2013-08-14 Thread Remko Popma (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-321?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13739726#comment-13739726 ] Remko Popma commented on LOG4J2-321: About the Log4jContextSelector, is it possible to

[jira] [Resolved] (LOG4J2-350) New attributes to be added in Log4j manifest

2013-08-14 Thread Gary Gregory (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gary Gregory resolved LOG4J2-350. - Resolution: Won't Fix As per the reply to the similar request for HttpClient [1]

Re: Usage of generics in Appender

2013-08-14 Thread Remko Popma
Does toSerializable need to be a single method? Can't we have separate methods that return different things? One method that returns a String, and a different method that returns a LogEvent copy? That would simplify things a lot, I think. On Wed, Aug 14, 2013 at 11:37 PM, Gary Gregory

Re: Usage of generics in Appender

2013-08-14 Thread Gary Gregory
On Wed, Aug 14, 2013 at 10:45 AM, Remko Popma remko.po...@gmail.com wrote: Does toSerializable need to be a single method? Can't we have separate methods that return different things? One method that returns a String, and a different method that returns a LogEvent copy? See Ralph's message

[jira] [Comment Edited] (LOG4J2-321) Provide configuration alternative to system properties

2013-08-14 Thread Remko Popma (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-321?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13739726#comment-13739726 ] Remko Popma edited comment on LOG4J2-321 at 8/14/13 2:51 PM: -

Re: Usage of generics in Appender

2013-08-14 Thread Ralph Goers
I wanted to apply the patch for LOG4J2-338 first as I think the patch will have problems after this one is applied. Ralph On Aug 14, 2013, at 1:32 AM, Remko Popma wrote: Patch looks nice. Much fewer raw type compiler warnings. Seems like a big improvement to me. A small improvement on

Re: Usage of generics in Appender

2013-08-14 Thread Remko Popma
Would this not solve that problem? public interface Layout { byte[] giveMeAByteArray(LogEvent); String giveMeAString(LogEvent); LogEvent giveMeACopy(LogEvent); // LogEvent implements Serializable ... } On Wed, Aug 14, 2013 at 11:50 PM, Gary Gregory garydgreg...@gmail.comwrote: On

Re: Usage of generics in Appender

2013-08-14 Thread Nick Williams
Perhaps, but that's the whole point of generics. You don't NEED multiple methods because a single method's signature can change based on its type arguments. N On Aug 14, 2013, at 9:57 AM, Remko Popma wrote: Would this not solve that problem? public interface Layout { byte[]

Config files naming conventions [WAS: Config XSD naming convention]

2013-08-14 Thread Gary Gregory
I am renaming this thread from Config XSD naming convention to Config files naming conventions because it is not just about the XSD, so let me rephrase: I find the mixed use of naming conventions messy and confusing and for lack of a better term, not very pro as in professional. I'd like to use

Re: Config files naming conventions [WAS: Config XSD naming convention]

2013-08-14 Thread Paul Benedict
I know everyone has a certain convention they like, but I don't like multiple conventions. I think elements and attributes should follow the same convention. Whether you do TitleCase, or lowercase, or camelCase, just be consistent for it all. PS: Personally, I do lower case with dashes. That's

[jira] [Commented] (LOG4J2-351) [OSGi] wrong Fragment-Host in manifest files

2013-08-14 Thread Roland Weiglhofer (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13739768#comment-13739768 ] Roland Weiglhofer commented on LOG4J2-351: -- thanks and regards Roland

Re: Usage of generics in Appender

2013-08-14 Thread Remko Popma
Ralph, understood. On Wednesday, August 14, 2013, Ralph Goers wrote: I wanted to apply the patch for LOG4J2-338 first as I think the patch will have problems after this one is applied. Ralph On Aug 14, 2013, at 1:32 AM, Remko Popma wrote: Patch looks nice. Much fewer raw type compiler

[jira] [Updated] (LOG4J2-345) logging.log4j-1.2-api doesn't export the log4j API 1.2. Dependent bundles can not be resolved.

2013-08-14 Thread Gary Gregory (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-345?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gary Gregory updated LOG4J2-345: Reproduced In: 2.0-beta8, 2.0-beta4 (was: 2.0-beta4, 2.0-beta8, 2.0-beta9)

[jira] [Closed] (LOG4J2-342) XML configurator logs errors when it sees xml:base attributes

2013-08-14 Thread Gary Gregory (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-342?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gary Gregory closed LOG4J2-342. --- Fixed! :) XML configurator logs errors when it sees xml:base attributes

Re: [jira] [Resolved] (LOG4J2-342) XML configurator logs errors when it sees xml:base attributes

2013-08-14 Thread Gary Gregory
OK, I closed a couple of issues I had opened that are now fixed. Gary On Tue, Aug 13, 2013 at 10:23 PM, Ralph Goers ralph.go...@dslextreme.comwrote: I also prefer that workflow. However, I have no problem in marking the issue closed after the release if the user doesn't do it prior to it.

[jira] [Closed] (LOG4J2-341) Enable XInclude for XML configurations

2013-08-14 Thread Gary Gregory (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gary Gregory closed LOG4J2-341. --- Closing, LOG4J2-342 is fixed. Enable XInclude for XML configurations

Re: Config files naming conventions [WAS: Config XSD naming convention]

2013-08-14 Thread Ralph Goers
I'm fine with Gary's conventions. But... they should only matter when validating against the XSD. My preference is to leave the code alone and keep ignoring the case. Ralph On Aug 14, 2013, at 8:26 AM, Paul Benedict wrote: I know everyone has a certain convention they like, but I don't

Re: Config files naming conventions [WAS: Config XSD naming convention]

2013-08-14 Thread Gary Gregory
On Wed, Aug 14, 2013 at 12:30 PM, Ralph Goers ralph.go...@dslextreme.comwrote: I'm fine with Gary's conventions. But... they should only matter when validating against the XSD. My preference is to leave the code alone and keep ignoring the case. OK, let's keep the case business separate

Re: Config files naming conventions [WAS: Config XSD naming convention]

2013-08-14 Thread Ralph Goers
To be clear, i am fine with establishing the convention you are suggesting by making sure all the tests, examples and documentation follow it. Ralph On Aug 14, 2013, at 9:45 AM, Gary Gregory wrote: On Wed, Aug 14, 2013 at 12:30 PM, Ralph Goers ralph.go...@dslextreme.com wrote: I'm fine

Re: Config files naming conventions [WAS: Config XSD naming convention]

2013-08-14 Thread Gary Gregory
On Wed, Aug 14, 2013 at 3:10 PM, Ralph Goers ralph.go...@dslextreme.comwrote: To be clear, i am fine with establishing the convention you are suggesting by making sure all the tests, examples and documentation follow it. Ralph Roger that! Gary On Aug 14, 2013, at 9:45 AM, Gary

org.apache.logging.log4j.core.filter.DynamicThresholdFilter.createFilter(String, KeyValuePair[], String, String, String)

2013-08-14 Thread Gary Gregory
The code says that element name is Pairs but the manual says KeyValuePair in src/site/xdoc/manual/filters.xml Which one should be fixed? Gary -- E-Mail: garydgreg...@gmail.com | ggreg...@apache.org Java Persistence with Hibernate, Second Editionhttp://www.manning.com/bauer3/ JUnit in Action,

Re: Config files naming conventions [WAS: Config XSD naming convention]

2013-08-14 Thread Gary Gregory
Right now we have the element names Jdbc and SMTP. Should we use CamelCase for acronyms (JDBC) or treat an acronym as a word (Jdbc)? Gary On Wed, Aug 14, 2013 at 4:00 PM, Gary Gregory garydgreg...@gmail.comwrote: On Wed, Aug 14, 2013 at 3:10 PM, Ralph Goers ralph.go...@dslextreme.comwrote:

Re: Config files naming conventions [WAS: Config XSD naming convention]

2013-08-14 Thread Paul Benedict
You sure you don't want to do everywhere lower case? :-) It eliminates these kinds of questions too. On Wed, Aug 14, 2013 at 4:26 PM, Gary Gregory garydgreg...@gmail.comwrote: Right now we have the element names Jdbc and SMTP. Should we use CamelCase for acronyms (JDBC) or treat an acronym

Re: Config files naming conventions [WAS: Config XSD naming convention]

2013-08-14 Thread Gary Gregory
On Aug 14, 2013, at 17:29, Paul Benedict pbened...@apache.org wrote: You sure you don't want to do everywhere lower case? :-) It eliminates these kinds of questions too. I am quite sure I do not want it all in lower case ;) Gary On Wed, Aug 14, 2013 at 4:26 PM, Gary Gregory

Re: org.apache.logging.log4j.core.filter.DynamicThresholdFilter.createFilter(String, KeyValuePair[], String, String, String)

2013-08-14 Thread Ralph Goers
Pairs is plural so it makes more sense. Ralph On Aug 14, 2013, at 2:05 PM, Gary Gregory wrote: The code says that element name is Pairs but the manual says KeyValuePair in src/site/xdoc/manual/filters.xml Which one should be fixed? Gary -- E-Mail: garydgreg...@gmail.com |

Log4j2 setup in Eclipse

2013-08-14 Thread Remko Popma
I don't mean to start a discussion on which IDE is best (please). Does anyone have a way to set up the log4j2 project in Eclipse so that all modules compile? And can you send me the Eclipse config files to accomplish that? I currently manually update the classpath by pointing to jars in my local

Re: Usage of generics in Appender

2013-08-14 Thread Remko Popma
Henning, I reviewed your patch and did not see any additional type casts. I think this is a misunderstanding that happened when two separate things were discussed together. 1. Does the Layout interface need to be generic to avoid type casts? 2. Does the Appender interface need to be generic to

Re: Log4j2 setup in Eclipse

2013-08-14 Thread Paul Benedict
Are you using the m2e plugin for Eclipse? If not, install it from Eclipse Marketplace. You'll also need its subclipse or subversive plugin so you can check out as a Maven project and it will be there. Paul On Wed, Aug 14, 2013 at 8:30 PM, Remko Popma remko.po...@gmail.com wrote: I don't mean

[jira] [Updated] (LOG4J2-343) Remove the Generics from Appender

2013-08-14 Thread Remko Popma (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-343?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Remko Popma updated LOG4J2-343: --- Attachment: LOG4J2-343_20130815-1117+0900.patch Attached LOG4J2-343_20130815-1117+0900.patch

Re: Usage of generics in Appender

2013-08-14 Thread Remko Popma
I have attached an update to Henning's patch to LOG4J2-343. The update was necessary to resolve the conflicts caused by the LOG4J2-353 refactoring. I would like to avoid doing this again so I would like to commit this patch soon (in a few hours or so). Ralph, have you already started working on

Re: Log4j2 setup in Eclipse

2013-08-14 Thread Gary Gregory
Use mvn eclipse:eclipse in the root and it will generate all the eclipse files you need. Then you can just import the projects in eclipse. M2E has never worked for me. Gary On Aug 14, 2013, at 21:58, Paul Benedict pbened...@apache.org wrote: Are you using the m2e plugin for Eclipse? If not,

Re: Log4j2 setup in Eclipse

2013-08-14 Thread Remko Popma
Gary, thanks. I'm getting the same error you had some time ago. Were you able to fix that? [INFO] Using Eclipse Workspace: C:\Users\remko\workspace [INFO] Adding default classpath container: org.eclipse.jdt.launching.JRE_CONTAINER [INFO]

Re: Log4j2 setup in Eclipse

2013-08-14 Thread Remko Popma
Update: Typically, the cause of this is because a POM author put a replaceable like $ {basedir} in the target or directory tags. This is not allowed. Target and Directory tags are relative to the POM, and are not supposed to have drive letters and paths to roots of the filesystem.