diff --git a/irods/connection.py b/irods/connection.py index 946468f8..aced8fea 100644 --- a/irods/connection.py +++ b/irods/connection.py @@ -536,7 +536,7 @@ def _login_pam(self): f.write(obf.encode(auth_out.result_)) logger.debug('new PAM pw write succeeded') - logger.info(f"PAM authorization validated (via {method})") + logger.info(f"PAM authorization validated (via %s)",method) def read_file(self, desc, size=-1, buffer=None): if size < 0: diff --git a/irods/test/scripts/test005_write_pam_credentials_to_secrets_file.bats b/irods/test/scripts/test005_write_pam_credentials_to_secrets_file.bats index 6dd1dd3a..90a04c91 100755 --- a/irods/test/scripts/test005_write_pam_credentials_to_secrets_file.bats +++ b/irods/test/scripts/test005_write_pam_credentials_to_secrets_file.bats @@ -34,10 +34,14 @@ teardown() sudo su - irods -c 'iadmin rpp alice' rm -f ~/.irods/.irodsA $PYTHON -c "import irods.client_init -import logging -logger = logging.getLogger('irods.connection') -logger.setLevel(logging.INFO) -logger.addHandler(logging.FileHandler('$logfile')) +import logging.config +logging.config.dictConfig( +{'handlers': {'file': {'class': 'logging.FileHandler', + 'filename': '$logfile'}}, + 'loggers': {'irods.connection': {'handlers': ['file'], + 'level': 'INFO'}}, + 'version': 1} +) irods.client_configuration.legacy_auth.pam.force_use_of_dedicated_pam_api = $force_long_token_compatible_api irods.client_init.write_pam_credentials_to_secrets_file('$ALICES_NEW_PAM_PASSWD')"