Fedora uses Logback as its logging framework. Information about the framework and its configuration can be found here: https://logback.qos.ch/index.html
Default Logging Configuration
The following logging properties must be set using -D arguments and cannot be set in the fcrepo.properties file.
Unless otherwise specified, Fedora will use the following default logback configuration file:
https://github.com/fcrepo/fcrepo/blob/fcrepo-6.0.0/fcrepo-webapp/src/main/resources/logback.xml
When this file is used, the Fedora logging output can be configured by setting System properties for either all logging output, or for individual packages.
Property | Description |
---|---|
fcrepo.log | All Fedora logging |
fcrepo.log.auth | Authentication and authorization |
fcrepo.log.http.api | REST API interface |
fcrepo.log.http.commons | REST API implementation |
fcrepo.log.jms | JMS events |
fcrepo.log.kernel | Core API |
These properties can be set to any of these values (in increasing verbosity): "ERROR", "WARN", "INFO" (the default), "DEBUG" or "TRACE". For example, to increase the access control logging to debug, but decrease all other logging to warn, add these System properties to your Java command line:
-Dfcrepo.log=WARN -Dfcrepo.log.auth=DEBUG
There are also a few properties for test logging, which only impact the logging when building Fedora from source:
Property | Description |
---|---|
fcrepo.log.integration.http | REST API integration tests |
fcrepo.log.integration.jms | JMS events integration tests |
Custom Logging Configuration
For more control over logging configuration - such as logging granularity, log file paths, or log rotation - you can specify the path to a custom logback file with the following java parameter:
-Dlogback.configurationFile=/path/to/custom/logback.xml
For more information about the syntax and options in these files, see the Logback Configuration page. The default Fedora logback file is also a helpful reference.