Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds+github@gmail.com>2020-11-05 00:36:19 +0000
committerAnton Hvornum <anton.feeds+github@gmail.com>2020-11-05 00:36:19 +0000
commit216917b9c3f18217308266565033ce9d1db3c038 (patch)
treebe0c194f62eeac35dacadb5855bf55a8091fb249 /archinstall/lib
parentc22e986874c60e7baffc503023070ec6ffbdda72 (diff)
Fallback automatically to a log file if we can detect one, even tho file was never given in the log() call. This might cause some log posts to slip in to the logs, but use suppress=True to force-ignore those in such a case.
Diffstat (limited to 'archinstall/lib')
-rw-r--r--archinstall/lib/output.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/archinstall/lib/output.py b/archinstall/lib/output.py
index e18a0cd2..8331a04c 100644
--- a/archinstall/lib/output.py
+++ b/archinstall/lib/output.py
@@ -80,6 +80,9 @@ def log(*args, **kwargs):
kwargs = {'bg' : 'black', 'fg': 'white', **kwargs}
string = stylize_output(string, **kwargs)
+ if (logfile := storage.get('logfile', None)) and 'file' not in kwargs:
+ kwargs['file'] = logfile
+
# Log to a file output unless specifically told to suppress this feature.
# (level has no effect on the log file, everything will be written there)
if 'file' in kwargs and ('suppress' not in kwargs or kwargs['suppress'] == False):