Logging system
Infrastructure
This project uses a logging framework provided by two mature libraries:
Logback: Framework's back-end, provides customizable logging levels and log appenders for console, files, etc.
scala-logging: Framework's front-end, reduces the verbosity of logging messages from the code thanks to several macros and utilities.
Functionality
Console log messages
RDFShape API is configured to use a Console Appender to log messages to the console, refer to CLI section to configure what is logged to the console via CLI arguments.
File log messages
RDFShape API is configured to use a Rolling File Appender to store all log messages of level DEBUG and above inside .log files, whether this messages are verbosely shown on console or not.
The logs written to the files:
Are located inside a
logsfolder, in the application's execution path. Therefore, make sure you run the app with a user with write access and from a location that is writable.Follow a size-based rolling policy, which implies that logs are rotated and compressed when they reach a certain file size defined in logback's configuration file.
Adding custom functionality
The project is already configured to work as explained above. For further configuration, check the logback.xml configuration file or the documentation of each respective library.