From b98850819bdbdb23e354bb5bf5d5383cf807d22d Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Wed, 4 Nov 2020 22:41:50 +0100 Subject: 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']`. --- archinstall/lib/profiles.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'archinstall/lib/profiles.py') diff --git a/archinstall/lib/profiles.py b/archinstall/lib/profiles.py index 322436c0..65ffd243 100644 --- a/archinstall/lib/profiles.py +++ b/archinstall/lib/profiles.py @@ -4,6 +4,7 @@ from collections import OrderedDict from .general import multisplit, sys_command, log from .exceptions import * from .networking import * +from .output import log, LOG_LEVELS UPSTREAM_URL = 'https://raw.githubusercontent.com/Torxed/archinstall/master/profiles' @@ -117,7 +118,7 @@ class Profile(): # TODO: Remove __builtins__['installation'] = self.installer with instructions as runtime: - log(f'{self} finished successfully.', bg='black', fg='green') + log(f'{self} finished successfully.', bg='black', fg='green', level=LOG_LEVELS.Info, file=storage.get('logfile', None)) return True -- cgit v1.2.3-70-g09d2