Skip to content
Eduardo Ulibarri Toledo edited this page Feb 18, 2022 · 5 revisions

Logging system

Infrastructure

This project uses a logging framework provided by two mature libraries:

  1. Logback: Framework's back-end, provides customizable logging levels and log appenders for console, files, etc.
  2. 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

The project 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

The project is configured to use a Rolling File Appender to store all log messages of level INFO and above inside .log files, whether this messages are shown on console or not.

The logs written to the files:

  • Are located inside a logs folder, 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 sized-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.