You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rp...@apache.org on 2022/01/01 05:37:15 UTC

[logging-log4j2] branch master updated (5cd3353 -> edb4813)

This is an automated email from the ASF dual-hosted git repository.

rpopma pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git.


    from 5cd3353  Fix RAT problems
     new cef017f  [LOG4J2-3267] add public Generate#generateExtend/Custom methods for automation
     new edb4813  [BUILD] add .toDelete file to RAT exclusions

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../apache/logging/log4j/core/tools/Generate.java  | 24 ++++++++++++++++++++++
 pom.xml                                            |  5 ++++-
 2 files changed, 28 insertions(+), 1 deletion(-)

[logging-log4j2] 02/02: [BUILD] add .toDelete file to RAT exclusions

Posted by rp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rpopma pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git

commit edb4813b1c4e930d89bd663771946d915177dffd
Author: rpopma <rp...@apache.org>
AuthorDate: Sat Jan 1 14:11:31 2022 +0900

    [BUILD] add .toDelete file to RAT exclusions
---
 pom.xml | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 30fd1a1..2ae785f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1452,6 +1452,7 @@
             <exclude>log4j-distribution/target/**/*</exclude>
             <exclude>log4j-distribution/.project</exclude>
             <exclude>log4j-distribution/.settings/**</exclude>
+            <exclude>**/.toDelete</exclude>
             <exclude>velocity.log</exclude>
             <!-- Other -->
             <exclude>felix-cache/**</exclude>
@@ -1655,6 +1656,7 @@
             <exclude>log4j-distribution/target/**/*</exclude>
             <exclude>log4j-distribution/.project</exclude>
             <exclude>log4j-distribution/.settings/**</exclude>
+            <exclude>**/.toDelete</exclude>
             <exclude>velocity.log</exclude>
             <!-- Other -->
             <exclude>felix-cache/**</exclude>
@@ -1858,6 +1860,7 @@
                 <exclude>log4j-distribution/target/**/*</exclude>
                 <exclude>log4j-distribution/.project</exclude>
                 <exclude>log4j-distribution/.settings/**</exclude>
+                <exclude>**/.toDelete</exclude>
                 <exclude>velocity.log</exclude>
                 <!-- Other -->
                 <exclude>felix-cache/**</exclude>
@@ -1865,7 +1868,7 @@
                 <exclude>**/*.yml</exclude>
                 <exclude>**/*.yaml</exclude>
                 <exclude>**/*.json</exclude>
-                <excllude>**/images/*.drawio</excllude>
+                <exclude>**/images/*.drawio</exclude>
                 <exclude>**/fluent-bit.conf</exclude>
                 <exclude>**/rabbitmq.config</exclude>
                 <exclude>**/MANIFEST.MF</exclude>

[logging-log4j2] 01/02: [LOG4J2-3267] add public Generate#generateExtend/Custom methods for automation

Posted by rp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rpopma pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git

commit cef017fa9e0cf1364d43915eb223059017ff04e2
Author: rpopma <rp...@apache.org>
AuthorDate: Sat Jan 1 12:10:01 2022 +0900

    [LOG4J2-3267] add public Generate#generateExtend/Custom methods for automation
---
 .../apache/logging/log4j/core/tools/Generate.java  | 24 ++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/tools/Generate.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/tools/Generate.java
index 9459351..0e68bc3 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/tools/Generate.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/tools/Generate.java
@@ -1061,6 +1061,30 @@ public final class Generate {
         generate(args, type, System.out);
     }
 
+    /**
+     * Generates source code for extended logger wrappers that provide convenience methods for the specified custom
+     * levels.
+     *
+     * @param args className of the custom logger to generate, followed by a NAME=intLevel pair for each custom log
+     *            level to generate convenience methods for
+     * @param printStream the stream to write the generated source code to
+     */
+    public static void generateExtend(final String[] args, final PrintStream printStream) {
+        generate(args, Type.EXTEND, printStream);
+    }
+
+    /**
+     * Generates source code for custom logger wrappers that only provide convenience methods for the specified
+     * custom levels, not for the standard built-in levels.
+     *
+     * @param args className of the custom logger to generate, followed by a NAME=intLevel pair for each custom log
+     *            level to generate convenience methods for
+     * @param printStream the stream to write the generated source code to
+     */
+    public static void generateCustom(final String[] args, final PrintStream printStream) {
+        generate(args, Type.CUSTOM, printStream);
+    }
+
     static void generate(final String[] args, final Type type, final PrintStream printStream) {
         if (!validate(args)) {
             usage(printStream, type.generator());