Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/mirrors.py
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds+github@gmail.com>2020-11-04 22:41:50 +0100
committerAnton Hvornum <anton.feeds+github@gmail.com>2020-11-04 22:41:50 +0100
commitb98850819bdbdb23e354bb5bf5d5383cf807d22d (patch)
tree8c2f5138612e532837dedfefc2832bd14b519abe /archinstall/lib/mirrors.py
parente06ca749a4382c37350d36cf08aa3fa5369ce9e2 (diff)
Added multiple log features.
* [Reintroduced](https://github.com/Torxed/archinstall/blob/f64a605449f59c677dff39962f1cb46616d893b7/archinstall.py#L57-L71) log levels * Created a global log file definition * Optional support for `python-systemd`'s journald handler. * Optional file output that has a globally configurable definition, that archinstall will honor in `archinstall.storage['logfile']`.
Diffstat (limited to 'archinstall/lib/mirrors.py')
-rw-r--r--archinstall/lib/mirrors.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/archinstall/lib/mirrors.py b/archinstall/lib/mirrors.py
index 1cd53ed0..a92c47e0 100644
--- a/archinstall/lib/mirrors.py
+++ b/archinstall/lib/mirrors.py
@@ -2,6 +2,7 @@ import urllib.request
from .exceptions import *
from .general import *
+from .output import log
def filter_mirrors_by_region(regions, destination='/etc/pacman.d/mirrorlist', tmp_dir='/root', *args, **kwargs):
"""
@@ -57,7 +58,7 @@ def insert_mirrors(mirrors, *args, **kwargs):
return True
def use_mirrors(regions :dict, destination='/etc/pacman.d/mirrorlist'):
- log(f'A new package mirror-list has been created: {destination}')
+ log(f'A new package mirror-list has been created: {destination}', level=LOG_LEVELS.Info, file=storage.get('logfile', None))
for region, mirrors in regions.items():
with open(destination, 'w') as mirrorlist:
for mirror in mirrors: