From 84c2944bf3ca9be9874ddc774f8a73b619b080cd Mon Sep 17 00:00:00 2001 From: OpenGnSys Support Team Date: Tue, 23 Apr 2024 10:30:36 +0200 Subject: live: revisit logging for partition setup, image create and restore --- src/live/ogOperations.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/live') diff --git a/src/live/ogOperations.py b/src/live/ogOperations.py index 41cf4b0..68aebac 100644 --- a/src/live/ogOperations.py +++ b/src/live/ogOperations.py @@ -151,7 +151,7 @@ class OgLiveOperations: if ogChangeRepo(repo, smb_user=self._smb_user, smb_pass=self._smb_pass) != 0: self._restartBrowser(self._url) raise OgError(f'Cannot change repository to {repo}') - logging.debug(f'restore_image_unicast: name => {name}') + if cache: image_path = f'/opt/opengnsys/cache/opt/opengnsys/images/{name}.img' if (not os.path.exists(image_path) or @@ -362,7 +362,7 @@ class OgLiveOperations: else: mkfs(fs, int(disk), partition) - logging.info('Setup command OK') + logging.info('Partition setup command OK') result = self.refresh(ogRest) self._restartBrowser(self._url) @@ -382,11 +382,7 @@ class OgLiveOperations: self._ogbrowser_clear_logs() self._restartBrowser(self._url_log) - logging.debug('Image restore params:') - logging.debug(f'\tname: {name}') - logging.debug(f'\trepo: {repo}') - logging.debug(f'\tprofile: {profile}') - logging.debug(f'\tctype: {ctype}') + logging.info(f'Request to restore image {name}.img via {ctype} from {repo}') if shutil.which('restoreImageCustom'): restoreImageCustom(repo, name, disk, partition, ctype) @@ -418,6 +414,8 @@ class OgLiveOperations: self._restartBrowser(self._url) raise OgError(f'Cannot change image repository to {repo}') + logging.info(f'Request to create image {name}.img at repository {repo}') + if ogRest.terminated: return -- cgit v1.2.3-18-g5258