Skip to content

Logfile records everything, but logging output to screen can be adjusted

Based on !30 (merged) (Although this is about the idea; if we don't like !30 (merged) we can still realise the proposal here.) I suggest merge into !30 (merged) so the relevant changes are easier to see.

Motivation

We generally do not look at log files (and neither do our users) unless something went wrong. There is thus no harm in putting all log information in there by default.

The output on the screen is what users may want to adjust: if all goes well, this should be fairly minimal. Perhaps for debugging or entertainment, we may want to know a little more.

Suggested change

Based on these thoughts, this MR suggests to

  • send all logging statements and all output to a log file (if a filename is provided to the set_up_logging function)
  • use the loglevel that the user provides to adjust only the amount of information sent to the screen.

Context and discussion

This is similar to Henning's FAI set up: the main file (corresponding to screen output) has a high level summary. Other files contain the details (and are always written, only mostly ignored).

Benefits

If something goes wrong; either for us or for users; we can ask for the log-file without any need to re-run the process (to activate debug output). Might be nice if compiling a tool chain takes a long time.

Edited by Hans Fangohr

Merge request reports

Loading