You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2020/12/01 17:39:42 UTC

[jena-site] 02/02: Fuseki logging, modules and notes for Tomcat9

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

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

commit 096543bd3ec11c981709fb9c4f6e4f31c1fef0e8
Author: Andy Seaborne <an...@apache.org>
AuthorDate: Tue Dec 1 17:34:03 2020 +0000

    Fuseki logging, modules and notes for Tomcat9
---
 source/documentation/fuseki2/__index.md        | 20 +++++++++++-
 source/documentation/fuseki2/fuseki-logging.md |  3 +-
 source/documentation/fuseki2/fuseki-webapp.md  | 43 ++++++++++++++++++++++++++
 3 files changed, 63 insertions(+), 3 deletions(-)

diff --git a/source/documentation/fuseki2/__index.md b/source/documentation/fuseki2/__index.md
index 5a6d4d8..a5e8729 100644
--- a/source/documentation/fuseki2/__index.md
+++ b/source/documentation/fuseki2/__index.md
@@ -35,8 +35,8 @@ transactional persistent storage layer, and incorporates
     - [As a Docker container](fuseki-main#fuseki-docker)
     - [As an embedded SPARQL server](fuseki-embedded.html)
     - [Security and data access control](fuseki-data-access-control.html)
+    - [Logging](fuseki-logging.html)
 - [Fuseki Configuration](fuseki-configuration.html)
-- [Logging](fuseki-logging.html)
 - [Server Statistics and Metrics](fuseki-server-info.html)
 - [How to Contribute](#how-to-contribute)
 - Client access
@@ -118,3 +118,21 @@ Development builds (not a formal release):
 
 Source code:
 [https://github.com/apache/jena/tree/master/jena-fuseki2](https://github.com/apache/jena/tree/master/jena-fuseki2)
+
+The Fuseki module are under "jena-fuseki2/":
+
+| Fuseki Module | Purpose |
+|---------------|-|
+| jena-fuseki-core | The Fuseki engine. All SPARQL operations.
+| <b>Webapp </b> | |
+| jena-fuseki-webapp | Web application and command line startup |
+| jena-fuseki-fulljar | Build the combined jar for Fuseki/UI server |
+| jena-fuseki-war | Build the war file for  Fusek/UI server |
+| apache-jena-fuseki | The download for Fuskei |
+| <b>Fuseki/Main</b> | |
+| jena-fuseki-main | Embedded server and command line 
+| jena-fuseki-server | Build the combined jar for Fusek/main server |
+| jena-fuseki-docker | Build a docker conntained based on Fusek/main |
+| <b>Other</b> | |
+| jena-fuseki-access | [Data access control](fuseki-data-access-control.html) |
+| jena-fuseki-geosparql | Integration for GeoSPARQL |
diff --git a/source/documentation/fuseki2/fuseki-logging.md b/source/documentation/fuseki2/fuseki-logging.md
index 55634c9..846c85f 100644
--- a/source/documentation/fuseki2/fuseki-logging.md
+++ b/source/documentation/fuseki2/fuseki-logging.md
@@ -32,11 +32,10 @@ or reverse proxy will log access requests anyway.
 
 ## Setting logging
 
-The Fuseki engine looks for the log4j2 configuration as follows:
+The Fuseki Main engine looks for the log4j2 configuration as follows:
 
 * Use system property `log4j2.configurationFile` if defined ([as usual for log4j2](https://logging.apache.org/log4j/2.x/manual/configuration.html)).
 * Use `file:log4j2.properties` (current directory) if it exists
-* Use file `log4j2.properties` in the directory defined by `FUSEKI_BASE` (webapp)
 * Use java resource `log4j2.properties` on the classpath.
 * Use java resource `org/apache/jena/fuseki/log4j2.properties` on the classpath.
 * Use a built-in configuration.
diff --git a/source/documentation/fuseki2/fuseki-webapp.md b/source/documentation/fuseki2/fuseki-webapp.md
index 23bfb92..0be492c 100644
--- a/source/documentation/fuseki2/fuseki-webapp.md
+++ b/source/documentation/fuseki2/fuseki-webapp.md
@@ -96,3 +96,46 @@ local machine.
 When deploying as a web application a more fully featured Admin API is
 made available and described on the 
 [Fuseki Server Protocol (REST API)](fuseki-server-protocol.html) page.
+
+## Configuring logging
+
+When running from a WAR file in a webapp container such as Apache Tomcat, the
+logging configuration comes from the file `log4j2.properties` in the root of the
+unpacked war file, e.g. `/var/lib/tomcat9/webapps/fuseki/log4j2.properties`.
+
+The name of the file is taken from `web.xml`:
+
+  <context-param>
+    <param-name>log4jConfiguration</param-name>
+    <param-value>log4j2.properties</param-value>
+  </context-param>
+
+Thsi only applies when running in a webapp container. When run from the command
+line, the server looks for `log4j2.properties` in the current directory and if
+not found, uses a built-in configuration.
+
+This logging goes to the standard output.
+
+## Fuseki with Tomcat9 and systemd
+
+`systemd` may be set to sandbox Tomcat9. The file area `/etc/fuseki` will not
+be writable to Fuseki. To enable this area, add `ReadWritePaths=/etc/fuseki/` to
+the file `/etc/systemd/system/tomcat9.service.d/override.conf`,
+creating the file if necessary.
+
+`systemd` also captures standard out and routes it to the system journal:
+
+```
+  journalctl -u tomcat9
+```
+
+To direct the output to the traditional location of
+/var/log/tomcat9/catalina.out use the `StandardOutput` setting in `override.conf`:
+
+```
+    [Service]
+   
+    # Allow access to the Fuseki area
+    ReadWritePaths=/etc/fuseki/
+    StandardOutput=file:/var/log/tomcat9/catalina.out
+```