[jira] [Updated] (LOG4J2-2289) DynamicFilterThreshold does not accept multiple KeyValuePairs
[ https://issues.apache.org/jira/browse/LOG4J2-2289?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hari Menon updated LOG4J2-2289: --- Description: The [log4j-config.xsd file|https://github.com/apache/logging-log4j2/blob/80d025ba68fc12d7b4d767fb25455306878279e1/log4j-core/src/main/resources/Log4j-config.xsd] defines KeyValuePairs in Filter as: {code:xml} {code} DynamicThresholdFilter can in fact take multiple KeyValuePairs. But that will not pass xsd validation because KeyValuePair is missing 'maxOccurs="unbounded"' attribute. Example: The following config will fail validation, although it should not: {code:xml} {code} If I remove one of the KeyValuePairs, it would pass. I use strict=true, and I cannot change that for various other reasons. was: The [log4j-config.xsd file|https://github.com/apache/logging-log4j2/blob/80d025ba68fc12d7b4d767fb25455306878279e1/log4j-core/src/main/resources/Log4j-config.xsd] defines KeyValuePairs in Filter as: {code:xml} {code} DynamicThresholdFilter can in fact take multiple KeyValuePairs. But that will not pass xsd validation because KeyValuePair is missing 'maxOccurs="unbounded"' attribute. Example: The following config will fail validation, although it should not: {code: xml} {code} If I remove one of the KeyValuePairs, it would pass. I use strict=true, and I cannot change that for various other reasons. > DynamicFilterThreshold does not accept multiple KeyValuePairs > - > > Key: LOG4J2-2289 > URL: https://issues.apache.org/jira/browse/LOG4J2-2289 > Project: Log4j 2 > Issue Type: Bug >Reporter: Hari Menon >Priority: Major > > The [log4j-config.xsd > file|https://github.com/apache/logging-log4j2/blob/80d025ba68fc12d7b4d767fb25455306878279e1/log4j-core/src/main/resources/Log4j-config.xsd] > defines KeyValuePairs in Filter as: > {code:xml} > > > > {code} > DynamicThresholdFilter can in fact take multiple KeyValuePairs. But that will > not pass xsd validation because KeyValuePair is missing > 'maxOccurs="unbounded"' attribute. > Example: The following config will fail validation, although it should not: > {code:xml} > defaultThreshold="INFO" > onMatch="ACCEPT" onMismatch="NEUTRAL"> > > > > {code} > If I remove one of the KeyValuePairs, it would pass. I use strict=true, and I > cannot change that for various other reasons. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (LOG4J2-1705) Kotlin wrapper for Log4j 2 API
[ https://issues.apache.org/jira/browse/LOG4J2-1705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16416198#comment-16416198 ] Matt Sicker commented on LOG4J2-1705: - Yes, I noticed you were already using the right artifact ids on closer inspection. I was confused with the parent pom which I renamed. > Kotlin wrapper for Log4j 2 API > -- > > Key: LOG4J2-1705 > URL: https://issues.apache.org/jira/browse/LOG4J2-1705 > Project: Log4j 2 > Issue Type: New Feature > Components: API >Reporter: Raman Gupta >Assignee: Matt Sicker >Priority: Major > > Similar to LOG4J2-1181 for Scala, provide a Kotlin wrapper for the Log4j 2 > API that makes use of Kotlin features like delegates and string interpolation. > If there is interest in this, I'd like to contribute a patch. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (LOG4J2-1705) Kotlin wrapper for Log4j 2 API
[ https://issues.apache.org/jira/browse/LOG4J2-1705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16416190#comment-16416190 ] Raman Gupta commented on LOG4J2-1705: - [~jvz] thanks, not sure if you noticed but the last few commits did include the updates you requested... see below for comments: > I'd suggest having integration tests using a {{ListAppender}}. Ok, done, check out LoggerCompanionTest, LoggerMixinCompanionExtendsTest, and LoggerMixinExtendsTest. I've also filled out the LoggerTest a little bit. > Yes, you can go ahead and delete {{KotlinCompleteLogger}}. Done! > The nullable type in the generic thing is something I missed and is pretty >neat! It is, isn't it? It's stuff like this that makes me realize Kotlin is *really* well thought out. > The API artifact id should be {{log4j-api-kotlin}} to match the existing >naming scheme. -It is already isn't it? The parent is log4j-kotlin, but the API artifact is log4j-api-kotlin. The group id is already org.apache.logging.log4j also.- Never mind, I see the changes you made on the (now) upstream repo. > Being a Kotlin project, would it make more sense to use gitbox (GitHub) >instead of the traditional git.apache.org+Jira workflow? This works for me. > Kotlin wrapper for Log4j 2 API > -- > > Key: LOG4J2-1705 > URL: https://issues.apache.org/jira/browse/LOG4J2-1705 > Project: Log4j 2 > Issue Type: New Feature > Components: API >Reporter: Raman Gupta >Assignee: Matt Sicker >Priority: Major > > Similar to LOG4J2-1181 for Scala, provide a Kotlin wrapper for the Log4j 2 > API that makes use of Kotlin features like delegates and string interpolation. > If there is interest in this, I'd like to contribute a patch. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Resolved] (LOG4J2-1705) Kotlin wrapper for Log4j 2 API
[ https://issues.apache.org/jira/browse/LOG4J2-1705?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Matt Sicker resolved LOG4J2-1705. - Resolution: Fixed I've merged your changes into the main repo: [https://github.com/apache/logging-log4j-kotlin] If I missed anything, please make a PR to there. I merged your history into the existing repo, so you may need to rebase or something to make a clean merge into this repo. > Kotlin wrapper for Log4j 2 API > -- > > Key: LOG4J2-1705 > URL: https://issues.apache.org/jira/browse/LOG4J2-1705 > Project: Log4j 2 > Issue Type: New Feature > Components: API >Reporter: Raman Gupta >Assignee: Matt Sicker >Priority: Major > > Similar to LOG4J2-1181 for Scala, provide a Kotlin wrapper for the Log4j 2 > API that makes use of Kotlin features like delegates and string interpolation. > If there is interest in this, I'd like to contribute a patch. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Work started] (LOG4J2-1705) Kotlin wrapper for Log4j 2 API
[ https://issues.apache.org/jira/browse/LOG4J2-1705?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Work on LOG4J2-1705 started by Matt Sicker. --- > Kotlin wrapper for Log4j 2 API > -- > > Key: LOG4J2-1705 > URL: https://issues.apache.org/jira/browse/LOG4J2-1705 > Project: Log4j 2 > Issue Type: New Feature > Components: API >Reporter: Raman Gupta >Assignee: Matt Sicker >Priority: Major > > Similar to LOG4J2-1181 for Scala, provide a Kotlin wrapper for the Log4j 2 > API that makes use of Kotlin features like delegates and string interpolation. > If there is interest in this, I'd like to contribute a patch. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (LOG4J2-1705) Kotlin wrapper for Log4j 2 API
[ https://issues.apache.org/jira/browse/LOG4J2-1705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16415947#comment-16415947 ] Matt Sicker commented on LOG4J2-1705: - I'm going to work on merging this today actually. I'll create new issues for what's remaining before we can release. > Kotlin wrapper for Log4j 2 API > -- > > Key: LOG4J2-1705 > URL: https://issues.apache.org/jira/browse/LOG4J2-1705 > Project: Log4j 2 > Issue Type: New Feature > Components: API >Reporter: Raman Gupta >Priority: Major > > Similar to LOG4J2-1181 for Scala, provide a Kotlin wrapper for the Log4j 2 > API that makes use of Kotlin features like delegates and string interpolation. > If there is interest in this, I'd like to contribute a patch. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (LOG4J2-1775) Log4j Boot modules for easy dependency management
[ https://issues.apache.org/jira/browse/LOG4J2-1775?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16415781#comment-16415781 ] Matt Sicker commented on LOG4J2-1775: - Since this project idea, we've further discussed modularization of log4j itself which sort of supersedes this idea. As for dependency injection, not without adding your application context to the logger context in the first place. > Log4j Boot modules for easy dependency management > - > > Key: LOG4J2-1775 > URL: https://issues.apache.org/jira/browse/LOG4J2-1775 > Project: Log4j 2 > Issue Type: Epic > Components: Boot, Documentation, Plugins >Reporter: Matt Sicker >Priority: Major > Labels: build, documentation, features, maven, test > > Create what is essentially Log4j Boot for adding necessary dependencies to > support the various plugins while at the same time promoting the use of > log4j-api as a general purpose logging API standard. These modules would > categorise all the various natural dependency barriers for a sort of pseudo > module system that could also help in any necessary module metadata needed to > support Java 9 and OSGi, categorise integration style unit tests to help test > the starters themselves in an automated way, and organise the site in such a > way as to make it easier to integrate different git repositories as we > modularise the core in general. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (LOG4J2-2288) Fix contribution documentation - No such branch nor tag log4j-2.11.0
[ https://issues.apache.org/jira/browse/LOG4J2-2288?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alessandro Baffa updated LOG4J2-2288: - Description: In the [documentation |https://logging.apache.org/log4j/2.x/source-repository.html]it's written {{$ git clone --branch log4j-2.11.0 [https://git-wip-us.apache.org/repos/asf/logging-log4j2.git]}} but there's no branch _log4j-2.11.__0_ nor tag _log4j-2.11.0_ yet. The tag available is log4j-2.11.0-rc1 so the git clone fails. was: In the [documentation |https://logging.apache.org/log4j/2.x/source-repository.html]it's written {{$ git clone --branch log4j-2.11.0 https://git-wip-us.apache.org/repos/asf/logging-log4j2.git}} but there's no branch _log4j-2.11.__0_ nor tag _log4j-2.11.0_ yet. The tag available is log4j-2.11.0-rc1. > Fix contribution documentation - No such branch nor tag log4j-2.11.0 > > > Key: LOG4J2-2288 > URL: https://issues.apache.org/jira/browse/LOG4J2-2288 > Project: Log4j 2 > Issue Type: Documentation > Components: Documentation >Reporter: Alessandro Baffa >Priority: Minor > > In the [documentation > |https://logging.apache.org/log4j/2.x/source-repository.html]it's written > {{$ git clone --branch log4j-2.11.0 > [https://git-wip-us.apache.org/repos/asf/logging-log4j2.git]}} > but there's no branch _log4j-2.11.__0_ nor tag _log4j-2.11.0_ yet. The tag > available is log4j-2.11.0-rc1 so the git clone fails. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (LOG4J2-2288) Fix contribution documentation - No such branch nor tag log4j-2.11.0
Alessandro Baffa created LOG4J2-2288: Summary: Fix contribution documentation - No such branch nor tag log4j-2.11.0 Key: LOG4J2-2288 URL: https://issues.apache.org/jira/browse/LOG4J2-2288 Project: Log4j 2 Issue Type: Documentation Components: Documentation Reporter: Alessandro Baffa In the [documentation |https://logging.apache.org/log4j/2.x/source-repository.html]it's written {{$ git clone --branch log4j-2.11.0 https://git-wip-us.apache.org/repos/asf/logging-log4j2.git}} but there's no branch _log4j-2.11.__0_ nor tag _log4j-2.11.0_ yet. The tag available is log4j-2.11.0-rc1. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Resolved] (LOG4J2-2286) Issue : Printing stack trace twice when JSON encoding enabled
[ https://issues.apache.org/jira/browse/LOG4J2-2286?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] hemant budhewar resolved LOG4J2-2286. - Resolution: Information Provided after usage of {{alwaysWriteExceptions = false, this issue is observed anymore.}} > Issue : Printing stack trace twice when JSON encoding enabled > - > > Key: LOG4J2-2286 > URL: https://issues.apache.org/jira/browse/LOG4J2-2286 > Project: Log4j 2 > Issue Type: Bug > Components: Core >Affects Versions: 2.10.0 >Reporter: hemant budhewar >Priority: Major > > > Description : Steps to reproduce : > > # Configure appender.root.layout.pattern = ${ "class": "%c* \{1}*", "data" : > "%m%enc\{%xThrowable}{JSON}"}%n > # warn("Test Exception", ex); > > Actual Result : > {class": "Test", "data" : "Test Exception java.lang.RuntimeException: > +Heer+\u000A\u0009at test.Test.test(Test.java:20) ~[bin/:?]\u000A\u0009at > test.Test.main(Test.java:41) [bin/:?]\u000A"} > java.lang.RuntimeException: +Heer+ > at test.Test.test(Test.java:20) ~[bin/:?] > at test.Test.main(Test.java:41) [bin/:?] > Expected result : > {"class": "Test", "data" : "Test Exception java.lang.RuntimeException: > +Heer+\u000A\u0009at test.Test.test(Test.java:20) ~[bin/:?]\u000A\u0009at > test.Test.main(Test.java:41) [bin/:?]\u000A"} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (LOG4J2-2287) LoggerContextRule doesn't work with multiple log tests
[ https://issues.apache.org/jira/browse/LOG4J2-2287?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alessandro Baffa updated LOG4J2-2287: - Description: Hi, this question is related to the closed LOG4J2-1316. Maybe it's still a bug, but I prefer to ask instead of opening a Bug ticket. I let the maintainer decide. I am still facing the same issue with _LoggerContextRule_ when it is used with JUnit @Rule in multiple tests that use a Logger. Same issue with @ClassRule, but in this case LoggerContext rule must be static. Once the first JUnit test is run, all the following tests fail with the the error {{ERROR StatusLogger File not found in file system or classpath: log4j2-test.xml}} Is it still related to the same problem in the closed issue? was: Hi, this question is related to the closed LOG4J2-1316. Maybe it's still a bug, but I prefer to ask instead of opening a Bug ticket. I let the maintainer decide. I am still facing the same issue with _LoggerContextRule_ when it is used with JUnit @Rule in multiple tests that use a Logger. Same issue with @ClassRule, but in this case LoggerContext rule must be static. Once the first JUnit test is run, the second test fails with the the error {{ERROR StatusLogger File not found in file system or classpath: log4j2-test.xml}} Is it still related to the same problem in the closed issue? > LoggerContextRule doesn't work with multiple log tests > -- > > Key: LOG4J2-2287 > URL: https://issues.apache.org/jira/browse/LOG4J2-2287 > Project: Log4j 2 > Issue Type: Question > Components: Configurators >Affects Versions: 2.11.0 > Environment: Java 8, > Gradle 4.5, > {{dependencies {}} > {{ compile('org.apache.logging.log4j:log4j-api:2.11.0')}} > {{ compile('org.apache.logging.log4j:log4j-core:2.11.0')}} > {{ compile('org.apache.logging.log4j:log4j-core:2.11.0:tests')}} > {{}}} >Reporter: Alessandro Baffa >Priority: Major > > Hi, > this question is related to the closed LOG4J2-1316. Maybe it's still a bug, > but I prefer to ask instead of opening a Bug ticket. I let the maintainer > decide. > I am still facing the same issue with _LoggerContextRule_ when it is used > with JUnit @Rule in multiple tests that use a Logger. Same issue with > @ClassRule, but in this case LoggerContext rule must be static. Once the > first JUnit test is run, all the following tests fail with the the error > {{ERROR StatusLogger File not found in file system or classpath: > log4j2-test.xml}} > Is it still related to the same problem in the closed issue? -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (LOG4J2-2287) LoggerContextRule doesn't work with multiple log tests
[ https://issues.apache.org/jira/browse/LOG4J2-2287?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alessandro Baffa updated LOG4J2-2287: - Description: Hi, this question is related to the closed LOG4J2-1316. Maybe it's still a bug, but I prefer to ask instead of opening a Bug ticket. I let the maintainer decide. I am still facing the same issue with _LoggerContextRule_ when it is used with JUnit @Rule in multiple tests that use a Logger. Same issue with @ClassRule, but in this case LoggerContext rule must be static. Once the first JUnit test is run, the second test fails with the the error {{ERROR StatusLogger File not found in file system or classpath: log4j2-test.xml}} Is it still related to the same problem in the closed issue? was: Hi, this question is related to the closed LOG4J2-1316. Maybe it's still a bug, but I prefer to ask instead of opening a Bug ticket. I leave the maintainer decide. I am still facing the same issue with _LoggerContextRule_ when it is used with JUnit @Rule in multiple tests that use a Logger. Same issue with @ClassRule, but in this case LoggerContext rule must be static. Once the first JUnit test is run, the second test fails with the the error {{ERROR StatusLogger File not found in file system or classpath: log4j2-test.xml}} Is it still related to the same problem in the closed issue? > LoggerContextRule doesn't work with multiple log tests > -- > > Key: LOG4J2-2287 > URL: https://issues.apache.org/jira/browse/LOG4J2-2287 > Project: Log4j 2 > Issue Type: Question > Components: Configurators >Affects Versions: 2.11.0 > Environment: Java 8, > Gradle 4.5, > {{dependencies {}} > {{ compile('org.apache.logging.log4j:log4j-api:2.11.0')}} > {{ compile('org.apache.logging.log4j:log4j-core:2.11.0')}} > {{ compile('org.apache.logging.log4j:log4j-core:2.11.0:tests')}} > {{}}} >Reporter: Alessandro Baffa >Priority: Major > > Hi, > this question is related to the closed LOG4J2-1316. Maybe it's still a bug, > but I prefer to ask instead of opening a Bug ticket. I let the maintainer > decide. > I am still facing the same issue with _LoggerContextRule_ when it is used > with JUnit @Rule in multiple tests that use a Logger. Same issue with > @ClassRule, but in this case LoggerContext rule must be static. Once the > first JUnit test is run, the second test fails with the the error > {{ERROR StatusLogger File not found in file system or classpath: > log4j2-test.xml}} > Is it still related to the same problem in the closed issue? -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (LOG4J2-2287) LoggerContextRule doesn't work with multiple log tests
[ https://issues.apache.org/jira/browse/LOG4J2-2287?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alessandro Baffa updated LOG4J2-2287: - Description: Hi, this question is related to the closed LOG4J2-1316. Maybe it's still a bug, but I prefer to ask instead of opening a Bug ticket. I leave the maintainer decide. I am still facing the same issue with _LoggerContextRule_ when it is used with JUnit @Rule in multiple tests that use a Logger. Same issue with @ClassRule, but in this case LoggerContext rule must be static. Once the first JUnit test is run, the second test fails with the the error {{ERROR StatusLogger File not found in file system or classpath: log4j2-test.xml}} Is it still related to the same problem in the closed issue? was: Hi, this issue is related to the closed [LOG4J2-1316|https://issues.apache.org/jira/browse/LOG4J2-1316]. I am still facing the same issue with _LoggerContextRule_ when it is used with JUnit @Rule in multiple tests that use a Logger. Same issue with @ClassRule, but in this case LoggerContext rule must be static. Once the first JUnit test is run, the second test fails with the the error {{ERROR StatusLogger File not found in file system or classpath: log4j2-test.xml}} Is it still related to the same problem in the closed issue? > LoggerContextRule doesn't work with multiple log tests > -- > > Key: LOG4J2-2287 > URL: https://issues.apache.org/jira/browse/LOG4J2-2287 > Project: Log4j 2 > Issue Type: Question > Components: Configurators >Affects Versions: 2.11.0 > Environment: Java 8, > Gradle 4.5, > {{dependencies {}} > {{ compile('org.apache.logging.log4j:log4j-api:2.11.0')}} > {{ compile('org.apache.logging.log4j:log4j-core:2.11.0')}} > {{ compile('org.apache.logging.log4j:log4j-core:2.11.0:tests')}} > {{}}} >Reporter: Alessandro Baffa >Priority: Major > > Hi, > this question is related to the closed LOG4J2-1316. Maybe it's still a bug, > but I prefer to ask instead of opening a Bug ticket. I leave the maintainer > decide. > I am still facing the same issue with _LoggerContextRule_ when it is used > with JUnit @Rule in multiple tests that use a Logger. Same issue with > @ClassRule, but in this case LoggerContext rule must be static. Once the > first JUnit test is run, the second test fails with the the error > {{ERROR StatusLogger File not found in file system or classpath: > log4j2-test.xml}} > Is it still related to the same problem in the closed issue? -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (LOG4J2-2287) LoggerContextRule doesn't work with multiple log tests
Alessandro Baffa created LOG4J2-2287: Summary: LoggerContextRule doesn't work with multiple log tests Key: LOG4J2-2287 URL: https://issues.apache.org/jira/browse/LOG4J2-2287 Project: Log4j 2 Issue Type: Question Components: Configurators Affects Versions: 2.11.0 Environment: Java 8, Gradle 4.5, {{dependencies {}} {{ compile('org.apache.logging.log4j:log4j-api:2.11.0')}} {{ compile('org.apache.logging.log4j:log4j-core:2.11.0')}} {{ compile('org.apache.logging.log4j:log4j-core:2.11.0:tests')}} {{}}} Reporter: Alessandro Baffa Hi, this issue is related to the closed [LOG4J2-1316|https://issues.apache.org/jira/browse/LOG4J2-1316]. I am still facing the same issue with _LoggerContextRule_ when it is used with JUnit @Rule in multiple tests that use a Logger. Same issue with @ClassRule, but in this case LoggerContext rule must be static. Once the first JUnit test is run, the second test fails with the the error {{ERROR StatusLogger File not found in file system or classpath: log4j2-test.xml}} Is it still related to the same problem in the closed issue? -- This message was sent by Atlassian JIRA (v7.6.3#76005)