Current Release

This documentation covers the current version of Fedora. Looking for another version? See all documentation.

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.

PropertyDescription
fcrepo.logAll Fedora logging
fcrepo.log.authAuthentication and authorization
fcrepo.log.http.apiREST API interface
fcrepo.log.http.commonsREST API implementation
fcrepo.log.jmsJMS events
fcrepo.log.kernelCore 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:

PropertyDescription
fcrepo.log.integration.httpREST API integration tests
fcrepo.log.integration.jmsJMS 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.

  • No labels