Merge branch 'fix-logging' into 'master'

logging: fix output for both Python 3.5 and 3.6+

See merge request !128
9 jobs for master
in 1 minute and 20 seconds and was queued for 10 seconds