diff --git a/src/radical/pilot/session.py b/src/radical/pilot/session.py index 1d4325820..bb5c096ec 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_version() - self._log.debug('Session(%s, %s)', self._uid, self._role) self._prof.prof('session_start', uid=self._uid)