The Febrl system is provided with a logging system and it
can display and save to a file logging information with different
levels (i.e. different volumes of output). A project log can
be defined in a project.py module as shown
in the code example below. It is assumed that the febrl.py
,odule has been imported using the import febrl
command (as the
ProjectLog class is implemented in the febrl
module),
and a project myproject
has been initialised (see also
Chapter 5).
# ==================================================================== mylog = febrl.ProjectLog(file_name = 'myfebrl.log', project = myproject, log_level = 1, verbose_level = 1, clear_log = True, no_warn = False, parallel_print = 'host')
The following arguments can be given to a project log when it is initialised.
file_name
None
no logging information will be saved (but
still displayed).
project
log_level
0
to 3
. Zero
means no information is logged into the log file (if specified),
and numbers between 1
and 3
mean an increasing of
the logging information. When set to level 1
, only
overview messages are saved, while with level 3
very
detailed (at record level) messages are saved.
verbose_level
log_level
this argument controls the level of
information that is displayed on standard output (i.e. the
terminal where Febrl is running). Valid are numbers in
the range of 0
to 3
, with nothing being displayed
with level 0
, and lost of information displayed at level
3
.
parallel_print
'host'
(the default) in which case only the host process
(where Febrl has been started on) is displaying and
logging messages, or 'all'
in which case all processes
are displaying and logging. Note that currently both error and
warning messages are displayed by all processes.
clear_log
True
or False
(default
is False
). When set to True
, all information
stored in the given log file is first erased, and a new log is
started. Otherwise, logging information is appended to a log
file (if it exists, otherwise it is created first).
no_warnings
True
or False
(default
is False
). If set to True
no warning messages are
logged or displayed (independent of the log and verbose level),
while if set to False
all warning messages are logged and
displayed (again independent of the log and verbose levels).