Improvment of logging features in Fractal/Cecilia-ADL compilers
Currently, there is no specific logging feature that has been used in the Fractal ADL compiler, and a specific Printer utility class is used in the Cecilia ADL compiler components. The current Printer class allows logging different levels of log messages on the console.
The subject of this feature request is to improve this logging infrastructure in order to ease the debugging of the ADL compiler. The java.util.logging package seems to be the most appropriate infrastructure for this issue. My proposal is to have a hierarchy of loggers as follows:
- A root logger that dumps the log messages on the console (and possibly into a file) using a simple formatter (possibly simpler than the standard SimpleFormatter). This root logger is the parent of different loggers which are associated to a given log category.
- One logger per log category (e.g. compilation environment, step-by-step compilation advancement flow, plug-in loading, input files that are loaded, etc.). The set of log categories will be extensible. The verbosity level can be set for each category-specific-logger to help programmers to focus on a given issue. These category specific loggers dump their output in a specific file (either in .txt or in XML or both). In addition, each of them may be configured to forward its output to the root logger to display its output on the console.
The configuration of these loggers (at least their verbosity levels and whether they forward the output to the console or not) will be configured using command-line arguments that are passed to the compiler (as this is already done in the Cecilia-ADL compiler).
The development will consist of creating some utility classes to configure the loggers, and of revisiting the fractal-adl and cecilia-adl code for instrumenting them in a way that they log their status.
Thanks is advance for your comments, critics and suggestions.