You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by ma...@apache.org on 2022/10/08 20:50:49 UTC

[logging-log4j2] branch master updated (7de2e9282f -> a1073d88b4)

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

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


    from 7de2e9282f Add Key Builder class and docs
     new d7a74f1387 Fix module-info.java PluginService reference
     new a1073d88b4 Move config tests using scripts to log4j-script

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:
 .../core/config/builder/api/ConfigurationBuilder.java      | 14 +++++++-------
 log4j-jul/src/test/java/module-info.java                   |  4 ++--
 .../script}/config/builder/ConfigurationAssemblerTest.java | 10 +++++-----
 .../script}/config/builder/ConfigurationBuilderTest.java   |  2 +-
 .../script}/config/builder/CustomConfigurationFactory.java |  2 +-
 5 files changed, 16 insertions(+), 16 deletions(-)
 rename {log4j-core-test/src/test/java/org/apache/logging/log4j/core => log4j-script/src/test/java/org/apache/logging/log4j/script}/config/builder/ConfigurationAssemblerTest.java (97%)
 rename {log4j-core-test/src/test/java/org/apache/logging/log4j/core => log4j-script/src/test/java/org/apache/logging/log4j/script}/config/builder/ConfigurationBuilderTest.java (99%)
 rename {log4j-core-test/src/test/java/org/apache/logging/log4j/core => log4j-script/src/test/java/org/apache/logging/log4j/script}/config/builder/CustomConfigurationFactory.java (98%)


[logging-log4j2] 02/02: Move config tests using scripts to log4j-script

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

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

commit a1073d88b493c4b602a614d007baeaa2a895397c
Author: Matt Sicker <ma...@apache.org>
AuthorDate: Sat Oct 8 15:50:01 2022 -0500

    Move config tests using scripts to log4j-script
    
    Signed-off-by: Matt Sicker <ma...@apache.org>
---
 .../core/config/builder/api/ConfigurationBuilder.java      | 14 +++++++-------
 .../script}/config/builder/ConfigurationAssemblerTest.java | 10 +++++-----
 .../script}/config/builder/ConfigurationBuilderTest.java   |  2 +-
 .../script}/config/builder/CustomConfigurationFactory.java |  2 +-
 4 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/builder/api/ConfigurationBuilder.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/builder/api/ConfigurationBuilder.java
index fa84b4339d..d5f7d74928 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/builder/api/ConfigurationBuilder.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/builder/api/ConfigurationBuilder.java
@@ -16,10 +16,6 @@
  */
 package org.apache.logging.log4j.core.config.builder.api;
 
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.concurrent.TimeUnit;
-
 import org.apache.logging.log4j.Level;
 import org.apache.logging.log4j.core.Filter;
 import org.apache.logging.log4j.core.LoggerContext;
@@ -27,6 +23,10 @@ import org.apache.logging.log4j.core.config.Configuration;
 import org.apache.logging.log4j.core.config.ConfigurationSource;
 import org.apache.logging.log4j.plugins.util.Builder;
 
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.concurrent.TimeUnit;
+
 /**
  * Interface for building logging configurations.
  * @param <T> The Configuration type created by this builder.
@@ -94,7 +94,7 @@ public interface ConfigurationBuilder<T extends Configuration> extends Builder<T
 
 
     /**
-     * Returns a builder for creating Async Loggers.
+     * Returns a builder for creating scripts. Requires {@code log4j-script}.
      * @param name The name of the Logger.
      * @param language The script language
      * @param text The script to execute.
@@ -103,7 +103,7 @@ public interface ConfigurationBuilder<T extends Configuration> extends Builder<T
     ScriptComponentBuilder newScript(String name, String language, String text);
 
     /**
-     * Returns a builder for creating Async Loggers.
+     * Returns a builder for creating script files. Requires {@code log4j-script}.
      * @param path The location of the script file.
      * @return A new ScriptFileComponentBuilder.
      */
@@ -111,7 +111,7 @@ public interface ConfigurationBuilder<T extends Configuration> extends Builder<T
 
 
     /**
-     * Returns a builder for creating Async Loggers.
+     * Returns a builder for creating script files. Requires {@code log4j-script}.
      * @param name The name of the script file.
      * @param path The location of the script file.
      * @return A new ScriptFileComponentBuilder.
diff --git a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/config/builder/ConfigurationAssemblerTest.java b/log4j-script/src/test/java/org/apache/logging/log4j/script/config/builder/ConfigurationAssemblerTest.java
similarity index 97%
rename from log4j-core-test/src/test/java/org/apache/logging/log4j/core/config/builder/ConfigurationAssemblerTest.java
rename to log4j-script/src/test/java/org/apache/logging/log4j/script/config/builder/ConfigurationAssemblerTest.java
index ac40a488b4..9b4a38f13d 100644
--- a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/config/builder/ConfigurationAssemblerTest.java
+++ b/log4j-script/src/test/java/org/apache/logging/log4j/script/config/builder/ConfigurationAssemblerTest.java
@@ -14,10 +14,7 @@
  * See the license for the specific language governing permissions and
  * limitations under the license.
  */
-package org.apache.logging.log4j.core.config.builder;
-
-import java.util.List;
-import java.util.Map;
+package org.apache.logging.log4j.script.config.builder;
 
 import org.apache.logging.log4j.Level;
 import org.apache.logging.log4j.LogManager;
@@ -40,6 +37,9 @@ import org.apache.logging.log4j.core.layout.PatternLayout;
 import org.apache.logging.log4j.core.util.Constants;
 import org.junit.jupiter.api.Test;
 
+import java.util.List;
+import java.util.Map;
+
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.instanceOf;
 import static org.junit.jupiter.api.Assertions.*;
@@ -66,7 +66,7 @@ public class ConfigurationAssemblerTest {
     public void testCustomConfigurationFactory() throws Exception {
         try {
             System.setProperty(ConfigurationFactory.CONFIGURATION_FACTORY_PROPERTY,
-                    "org.apache.logging.log4j.core.config.builder.CustomConfigurationFactory");
+                    "org.apache.logging.log4j.script.config.builder.CustomConfigurationFactory");
             System.setProperty(Constants.LOG4J_CONTEXT_SELECTOR,
                     "org.apache.logging.log4j.core.async.AsyncLoggerContextSelector");
             final Configuration config = ((LoggerContext) LogManager.getContext(false)).getConfiguration();
diff --git a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/config/builder/ConfigurationBuilderTest.java b/log4j-script/src/test/java/org/apache/logging/log4j/script/config/builder/ConfigurationBuilderTest.java
similarity index 99%
rename from log4j-core-test/src/test/java/org/apache/logging/log4j/core/config/builder/ConfigurationBuilderTest.java
rename to log4j-script/src/test/java/org/apache/logging/log4j/script/config/builder/ConfigurationBuilderTest.java
index b4449cd4ed..32b870d202 100644
--- a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/config/builder/ConfigurationBuilderTest.java
+++ b/log4j-script/src/test/java/org/apache/logging/log4j/script/config/builder/ConfigurationBuilderTest.java
@@ -14,7 +14,7 @@
  * See the license for the specific language governing permissions and
  * limitations under the license.
  */
-package org.apache.logging.log4j.core.config.builder;
+package org.apache.logging.log4j.script.config.builder;
 
 import org.apache.logging.log4j.Level;
 import org.apache.logging.log4j.core.Filter;
diff --git a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/config/builder/CustomConfigurationFactory.java b/log4j-script/src/test/java/org/apache/logging/log4j/script/config/builder/CustomConfigurationFactory.java
similarity index 98%
rename from log4j-core-test/src/test/java/org/apache/logging/log4j/core/config/builder/CustomConfigurationFactory.java
rename to log4j-script/src/test/java/org/apache/logging/log4j/script/config/builder/CustomConfigurationFactory.java
index 3ffd49971d..2bdfa9d40b 100644
--- a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/config/builder/CustomConfigurationFactory.java
+++ b/log4j-script/src/test/java/org/apache/logging/log4j/script/config/builder/CustomConfigurationFactory.java
@@ -14,7 +14,7 @@
  * See the license for the specific language governing permissions and
  * limitations under the license.
  */
-package org.apache.logging.log4j.core.config.builder;
+package org.apache.logging.log4j.script.config.builder;
 
 import org.apache.logging.log4j.Level;
 import org.apache.logging.log4j.core.Filter;


[logging-log4j2] 01/02: Fix module-info.java PluginService reference

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

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

commit d7a74f138794457b3a14bfd6f050d69711ecd6d5
Author: Matt Sicker <ma...@apache.org>
AuthorDate: Sat Oct 8 15:49:04 2022 -0500

    Fix module-info.java PluginService reference
    
    Signed-off-by: Matt Sicker <ma...@apache.org>
---
 log4j-jul/src/test/java/module-info.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/log4j-jul/src/test/java/module-info.java b/log4j-jul/src/test/java/module-info.java
index 764f4036d3..db3a0aa361 100644
--- a/log4j-jul/src/test/java/module-info.java
+++ b/log4j-jul/src/test/java/module-info.java
@@ -27,5 +27,5 @@ module org.apache.logging.log4j.jul.test {
 
     requires junit;
 
-    provides org.apache.logging.log4j.plugins.processor.PluginService with org.apache.logging.log4j.jul.test.plugins.Log4jPlugins;
-}
\ No newline at end of file
+    provides org.apache.logging.log4j.plugins.model.PluginService with org.apache.logging.log4j.jul.test.plugins.Log4jPlugins;
+}