From 7e558fffd0e25d3dfebb049853b744a9fb44972f Mon Sep 17 00:00:00 2001 From: Andre Merzky Date: Mon, 9 Sep 2024 23:57:30 +0200 Subject: [PATCH 1/2] always log full version also --- src/radical/pilot/session.py | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/src/radical/pilot/session.py b/src/radical/pilot/session.py index 1d4325820..4e0ba6d1c 100644 --- a/src/radical/pilot/session.py +++ b/src/radical/pilot/session.py @@ -428,9 +428,7 @@ def _init_cfg_from_scratch(self): level=self._cfg.get('log_lvl'), debug=self._cfg.get('debug_lvl')) - from . import version_detail as rp_version_detail - self._log.info('radical.pilot version: %s', rp_version_detail) - self._log.info('radical.utils version: %s', ru.version_detail) + self._log_version() self._prof.prof('session_start', uid=self._uid) @@ -438,6 +436,20 @@ def _init_cfg_from_scratch(self): self._rep.plain('[%s]' % self._uid) + # -------------------------------------------------------------------------- + # + def _log_version(self): + + from . import version as rp_version + from . import version_detail as rp_version_detail + + self._log.info('Session(%s, %s)', self._uid, self._role) + self._log.info('radical.pilot version: %s (%s)', rp_version, + rp_version_detail) + self._log.info('radical.utils version: %s (%s)', ru.version, + ru.version_detail) + + # -------------------------------------------------------------------------- # def _init_cfg_from_dict(self): @@ -480,9 +492,7 @@ def _init_cfg_from_dict(self): level=self._cfg.get('log_lvl'), debug=self._cfg.get('debug_lvl')) - from . import version_detail as rp_version_detail - self._log.info('radical.pilot version: %s', rp_version_detail) - self._log.info('radical.utils version: %s', ru.version_detail) + self._log_version() self._prof.prof('session_start', uid=self._uid) @@ -509,11 +519,8 @@ def _init_cfg_from_registry(self): level=self._cfg.get('log_lvl'), debug=self._cfg.get('debug_lvl')) - from . import version_detail as rp_version_detail - self._log.info('radical.pilot version: %s', rp_version_detail) - self._log.info('radical.utils version: %s', ru.version_detail) + self._log_setup() - self._log.debug('Session(%s, %s)', self._uid, self._role) self._prof.prof('session_start', uid=self._uid) From 6d02d384c41998b869223f146961d1224eaca131 Mon Sep 17 00:00:00 2001 From: Andre Merzky Date: Thu, 19 Sep 2024 19:59:40 +0200 Subject: [PATCH 2/2] fix typo --- src/radical/pilot/session.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/radical/pilot/session.py b/src/radical/pilot/session.py index 4e0ba6d1c..bb5c096ec 100644 --- a/src/radical/pilot/session.py +++ b/src/radical/pilot/session.py @@ -519,7 +519,7 @@ def _init_cfg_from_registry(self): level=self._cfg.get('log_lvl'), debug=self._cfg.get('debug_lvl')) - self._log_setup() + self._log_version() self._prof.prof('session_start', uid=self._uid)