15. Logging and Console Output

The Febrl system is provided with a logging system that can display and save to a file logging information with different levels (i.e. different details of output). A project log can be initialised in a project.py module as shown in the code example below. It is assumed that the febrl.py module has been imported using the from febrl import *  command (as the init_febrl_logger() function is implemented in the febrl module). A project log should be initialised first thing in a project module, as shown in Chapter 5. See the Python standard module logging.py for more details about the Python logging system.

# ====================================================================

init_febrl_logger(log_file_name = 'example-febrl-project.log',
                     file_level = 'WARNING',
                  console_level = 'INFO',
                      clear_log = False,
                parallel_output = 'host')

The following arguments need to be given to a project log when it is initialised.

Note: The current version of the Febrl system only supports logging into text files. Future version will provide logging into other formats as well, for example HTML, XML or LaTeX.