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

andy pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/jena.git

commit 308b6e276d97995e9afd9fe2b3b6e0b416bc092e
Author: Andy Seaborne <[email protected]>
AuthorDate: Sat Dec 14 16:32:16 2024 +0000

    Tidy up Fuseki logging
---
 jena-fuseki2/apache-jena-fuseki/log4j2.properties  |  6 +++---
 .../main/java/org/apache/jena/fuseki/Fuseki.java   | 25 +++++++++++++---------
 .../apache/jena/fuseki/system/FusekiLogging.java   |  5 ++---
 .../org/apache/jena/fuseki/main/FusekiServer.java  |  2 +-
 .../src/main/webapp/log4j2.properties              |  7 ++++--
 5 files changed, 26 insertions(+), 19 deletions(-)

diff --git a/jena-fuseki2/apache-jena-fuseki/log4j2.properties 
b/jena-fuseki2/apache-jena-fuseki/log4j2.properties
index 81dac1df7b..c261a1b877 100644
--- a/jena-fuseki2/apache-jena-fuseki/log4j2.properties
+++ b/jena-fuseki2/apache-jena-fuseki/log4j2.properties
@@ -1,6 +1,6 @@
 ## Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
 status = error
-name = PropertiesConfig
+name = FusekiLogging
 filters = threshold
 
 filter.threshold.type = ThresholdFilter
@@ -11,7 +11,7 @@ appender.console.name = OUT
 appender.console.target = SYSTEM_ERR
 appender.console.layout.type = PatternLayout
 appender.console.layout.pattern = %d{HH:mm:ss} %-5p %-15c{1} :: %m%n
-#appender.console.layout.pattern = [%d{yyyy-MM-dd HH:mm:ss}] %-5p %-15c{1} :: 
%m%n
+## appender.console.layout.pattern = [%d{yyyy-MM-dd HH:mm:ss}] %-5p %-15c{1} 
:: %m%n
 
 rootLogger.level                  = INFO
 rootLogger.appenderRef.stdout.ref = OUT
@@ -49,7 +49,7 @@ logger.jetty.level = WARN
 logger.shiro.name = org.apache.shiro
 logger.shiro.level = WARN
 
-# Hide bug with Shiro 1.5.0+, 2.0.0
+# Hide issue with Shiro 1.5.0+, 2.0.0
 logger.shiro-realm.name = org.apache.shiro.realm.text.IniRealm
 logger.shiro-realm.level = ERROR
 
diff --git 
a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/Fuseki.java
 
b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/Fuseki.java
index b58e75a135..e51b47bdc8 100644
--- 
a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/Fuseki.java
+++ 
b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/Fuseki.java
@@ -132,14 +132,16 @@ public class Fuseki {
     /** Instance of log for operations. */
     public static final Logger        adminLog          = 
LoggerFactory.getLogger(adminLogName);
 
-    /** Admin log file for operations. */
-    public static final String        builderLogName    = PATH + ".Builder";
-
-    /** Instance of log for operations. */
-    public static final Logger        builderLog        = 
LoggerFactory.getLogger(builderLogName);
-
-    /** Validation log file for operations. */
-    public static final String        validationLogName = PATH + ".Validate";
+    // Unused
+//    /** Admin log file for operations. */
+//    public static final String        builderLogName    = PATH + ".Builder";
+//
+//    /** Instance of log for operations. */
+//    public static final Logger        builderLog        = 
LoggerFactory.getLogger(builderLogName);
+//
+//    // Now validation uses action logger.
+//    /** Validation log file for operations. */
+//    public static final String        validationLogName = PATH + ".Validate";
 
     /** Instance of log for validation. */
     public static final Logger        validationLog     = 
LoggerFactory.getLogger(adminLogName);
@@ -150,10 +152,13 @@ public class Fuseki {
     /** Instance of log for general server messages. */
     public static final Logger        serverLog         = 
LoggerFactory.getLogger(serverLogName);
 
-    /** Logger used for the servletContent.log operations (if settable -- 
depends on environment) */
+    /**
+     * Logger used for the servletContent.log operations (if settable -- 
depends on environment).
+     * This is both the display name of the servlet context and the logger 
name.
+     */
     public static final String        servletRequestLogName     = PATH + 
".Servlet";
 
-    /** Actual log file for config server messages. */
+    /** log for config server messages. */
     public static final String        configLogName     = PATH + ".Config";
 
     /** Instance of log for config server messages. */
diff --git 
a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/system/FusekiLogging.java
 
b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/system/FusekiLogging.java
index b1e8cc9098..a6356b057e 100644
--- 
a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/system/FusekiLogging.java
+++ 
b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/system/FusekiLogging.java
@@ -279,15 +279,14 @@ public class FusekiLogging
                 logger.jetty.name  = org.eclipse.jetty
                 logger.jetty.level = WARN
 
-                logger.apache-http.name   = org.apache.http
-                logger.apache-http.level  = WARN
                 logger.shiro.name = org.apache.shiro
                 logger.shiro.level = WARN
 
-                # Hide bug in Shiro 1.5.0
+                # Hide issue with Shiro 1.5.0+, 2.0.0
                 logger.shiro-realm.name = org.apache.shiro.realm.text.IniRealm
                 logger.shiro-realm.level = ERROR
 
+                ## (NCSA) Common Log Format request log
                 # This goes out in NCSA format
                 appender.plain.type = Console
                 appender.plain.name = PLAIN
diff --git 
a/jena-fuseki2/jena-fuseki-main/src/main/java/org/apache/jena/fuseki/main/FusekiServer.java
 
b/jena-fuseki2/jena-fuseki-main/src/main/java/org/apache/jena/fuseki/main/FusekiServer.java
index 261a10cda7..313540ee0e 100644
--- 
a/jena-fuseki2/jena-fuseki-main/src/main/java/org/apache/jena/fuseki/main/FusekiServer.java
+++ 
b/jena-fuseki2/jena-fuseki-main/src/main/java/org/apache/jena/fuseki/main/FusekiServer.java
@@ -1705,7 +1705,7 @@ public class FusekiServer {
                 contextPath = "/" + contextPath;
             ServletContextHandler context = new ServletContextHandler();
             context.setDisplayName(Fuseki.servletRequestLogName);
-            // Also set on the server which handles request that don't 
dispatch.
+            // Also set on the server which handles requests that don't 
Fuseki-dispatch.
             context.setErrorHandler(errorHandler);
             context.setContextPath(contextPath);
             // SPARQL Update by HTML - not the best way but.
diff --git a/jena-fuseki2/jena-fuseki-webapp/src/main/webapp/log4j2.properties 
b/jena-fuseki2/jena-fuseki-webapp/src/main/webapp/log4j2.properties
index 0524e408b0..029030168d 100644
--- a/jena-fuseki2/jena-fuseki-webapp/src/main/webapp/log4j2.properties
+++ b/jena-fuseki2/jena-fuseki-webapp/src/main/webapp/log4j2.properties
@@ -1,14 +1,17 @@
 ## Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
 
-## Plain output to stdout
 status = error
 name = FusekiLoggingWebapp
+filters = threshold
+filter.threshold.type = ThresholdFilter
+filter.threshold.level = ALL
 
 appender.console.type = Console
 appender.console.name = OUT
 appender.console.target = SYSTEM_OUT
 appender.console.layout.type = PatternLayout
-appender.console.layout.pattern = [%d{yyyy-MM-dd HH:mm:ss}] %-10c{1} %-5p %m%n
+## appender.console.layout.pattern = %d{HH:mm:ss} %-5p %-15c{1} :: %m%n
+appender.console.layout.pattern = [%d{yyyy-MM-dd HH:mm:ss}] %-5p %-15c{1} :: 
%m%n
 
 rootLogger.level                  = INFO
 rootLogger.appenderRef.stdout.ref = OUT

Reply via email to