Fuseki logs operation details and also provides a standard NCSA request log.
Logging is via SLF4J over Apache Log4J2, or by the Tomcat configuration if running the WAR file.
Full Log name | Usage |
---|---|
org.apache.jena.fuseki.Server | General Server Messages |
org.apache.jena.fuseki.Request | NCSA request Log. |
org.apache.jena.fuseki.Fuseki | The HTTP request log |
org.apache.jena.fuseki.Admin | Administration operations |
org.apache.jena.fuseki.Builder | Dataset and service build operations |
org.apache.jena.fuseki.Config | Configuration |
This log is in NCSA extended/combined log format.
Many web log analysers can process this format.
This log is normally off. The logger name is org.apache.jena.fuseki.Request
.
When run as a WAR file inside a webapp container (e.g. Apache Tomcat), the webapp container or reverse proxy will log access requests anyway.
The Fuseki engine looks for the log4j2 configuration as follows:
log4j2.configurationFile
if defined (as usual for log4j2).file:log4j2.properties
(current directory) if it existslog4j2.properties
in the directory defined by FUSEKI_BASE
(webapp)log4j2.properties
on the classpath.org/apache/jena/fuseki/log4j2.properties
on the classpath.The last step is a fallback to catch the case where Fuseki has been repackaged into a new WAR file and org/apache/jena/fuseki/log4j.properties
omitted, or run from the base jar. It is better to include org/apache/jena/fuseki/log4j.properties
.
The preferred customization is to use a custom log4j2.properties
file in the directory where Fuseki Main is run.
For the war file packaging, the log4j2.properties
should go in FUSEKI_BASE
which defaults to /etc/fuseki
on Linux.
For the standalone webapp server, FUSEKI_BASE
defaults to directory run/
within the directory where the server is run.
The default log4j2.properties.
Below is an example logrotate(1) configuration (to go in /etc/logrotate.d
) assuming the log file has been put in /etc/fuseki/logs/fuseki.log
.
It rotates the logs once a month, compresses logs on rotation, and keeps them for 6 months.
It uses copytruncate
. This may lead to at most one broken log file line.
/etc/fuseki/logs/fuseki.log { compress monthly rotate 6 create missingok copytruncate # Date in extension. dateext # No need # delaycompress }