Fuseki logs operation details and also provides a standard NCSA request log.
Logging is via slj4j over Apache Log4J. Logging output is controlled via log4j.
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.
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 log4j configuration as follows:
log4j.configuration
if defined (as usual for log4j).file:log4j.properties
(current directory) if it existslog4j.properties
is the directory defined by FUSEKI_BASE
log4j.properties
on the classpath.org/apache/jena/fuseki/log4j.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 log4j.properties
file in
FUSEKI_BASE
. For the WAR file, FUSEKI_BASE
defaults to /etc/fuseki
on Linux. For the standalone server, FUSEKI_BASE
defaults to directory
run/
within the directory where the server is run.
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 }