Logs


FlowerDocs uses the [Logback] library (https://logback.qos.ch/) to manage application logs.

Log files


The following parameters can be set in the core.properties and gui.properties files:

Parameter Default value Description
logging.file.name flowerdocs-xxx.log Log file path
logging.file.max-size 10MB Maximum log file size at which rotation is enabled
logging.file.max-history undefined Maximum number of log files
logging.level.root INFO Default log level

Log levels


FlowerDocs and the libraries used push logs on several levels:

  • TRACE: the finest level of information, providing debugging information (can be activated following a support request)
  • DEBUG: level for obtaining debugging information (can be activated following a support request)
  • INFO: messages given for information only
  • WARN: warning messages
  • ERROR: errors intercepted by the application


The log level can be defined by Java package by adding a logging.level.<package>=<niveau> parameter such as:

logging.level.com.flower.docs.core.tsp=DEBUG

Variables


On a shared or heavily-used platform, logs may need to be contextualized. FlowerDocs provides variables that can be displayed in log messages:

  • user: current user identifier
  • scope: identifier of the scope on which the current user is authenticated
  • request: unique identifier of the request sent (in the case of a request sent to FlowerDocs GUI and propagated to FlowerDocs Core, the identifier is retained)

To use these variables, simply modify the logging.pattern.level parameter of theappender in question: %X{variable} such as:

logging.pattern.level=%X{request} %X{scope} %X{user} %5p