Skip to content

Commit

Permalink
Tidy up Fuseki logging
Browse files Browse the repository at this point in the history
  • Loading branch information
afs committed Dec 14, 2024
1 parent 2e3970a commit e2dd3ac
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 19 deletions.
6 changes: 3 additions & 3 deletions jena-fuseki2/apache-jena-fuseki/log4j2.properties
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,16 @@ public static void initConsts() {}
/** 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);
Expand All @@ -150,10 +152,13 @@ public static void initConsts() {}
/** 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. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,15 +279,14 @@ private static String log4j2setupFallback() {
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1705,7 +1705,7 @@ else if ( !contextPath.startsWith("/") )
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.
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit e2dd3ac

Please sign in to comment.