diff --git a/source/jdbcDriverOOo/resource/OptionsDialog_en_US.properties b/source/jdbcDriverOOo/resource/OptionsDialog_en_US.properties index 41d55bef..55fbc7c1 100644 --- a/source/jdbcDriverOOo/resource/OptionsDialog_en_US.properties +++ b/source/jdbcDriverOOo/resource/OptionsDialog_en_US.properties @@ -1,16 +1,6 @@ 100=OptionsDialog.__init__() -101=OptionsDialog initialization completed +101=OptionsDialog has been loaded. -110=OptionsDialog._clearLog() -111=Clear log ... finished - -120=OptionsDialog._logInfo() -121=Python version: %s -122=Python Path: %s - -130=OptionsDialog._reloadVersion() -131=A restart is necessary - -140=OptionsDialog._getDriverVersion() -141=Uno error while loading the driver: %s -142=Error while loading the driver: %s\nTraceback: %s +110=OptionsDialog._getDriverVersion() +111=Uno error while loading the driver: {} +112=Error while loading the driver: {}\nTraceback: {} diff --git a/source/jdbcDriverOOo/resource/OptionsDialog_fr_FR.properties b/source/jdbcDriverOOo/resource/OptionsDialog_fr_FR.properties index d631d9a8..b68ecf1a 100644 --- a/source/jdbcDriverOOo/resource/OptionsDialog_fr_FR.properties +++ b/source/jdbcDriverOOo/resource/OptionsDialog_fr_FR.properties @@ -1,16 +1,6 @@ 100=OptionsDialog.__init__() -101=Initialisation d'OptionsDialog termin\u00e9e +101=OptionsDialog a été chargé. -110=OptionsDialog._clearLog() -111=Effacement du journal ... termin\u00e9 - -120=OptionsDialog._logInfo() -121=Version de Python: %s -122=Python Path: %s - -130=OptionsDialog._reloadVersion() -131=Un red\u00e9marrage est n\u00e9cessaire - -140=OptionsDialog._getDriverVersion() -141=Erreur Uno lors du chargement du pilote: %s -142=Erreur lors du chargement du pilote: %s\nTraceback: %s +110=OptionsDialog._getDriverVersion() +111=Erreur Uno lors du chargement du pilote: {} +112=Erreur lors du chargement du pilote: {}\nTraceback: {} diff --git a/source/jdbcDriverOOo/service/pythonpath/jdbcdriver/options/optionsmodel.py b/source/jdbcDriverOOo/service/pythonpath/jdbcdriver/options/optionsmodel.py index 7ce81f78..f3b2979d 100644 --- a/source/jdbcDriverOOo/service/pythonpath/jdbcdriver/options/optionsmodel.py +++ b/source/jdbcDriverOOo/service/pythonpath/jdbcdriver/options/optionsmodel.py @@ -92,6 +92,8 @@ def __init__(self, ctx, lock): root = self._getRootProtocol(False) self._driver = config.getByName(root) self._drivers = self._getDriverConfigurations(config, root) + self._logger = getLogger(ctx, 'Driver', g_basename) + self._logger.logprb(INFO, 'OptionsDialog', '__init__()', 101) # OptionsModel getter methods def getTabData(self): @@ -303,11 +305,9 @@ def _getDriverVersion(self, driver, protocol): version = self._version % connection.getMetaData().getDriverVersion() connection.close() except UnoException as e: - logger = getLogger(self._ctx, g_extension, g_basename) - logger.logprb(SEVERE, 'OptionsDialog', '_getDriverVersion()', 141, e.Message) + self._logger.logprb(SEVERE, 'OptionsDialog', '_getDriverVersion()', 111, e.Message) except Exception as e: - logger = getLogger(self._ctx, g_extension, g_basename) - logger.logprb(SEVERE, 'OptionsDialog', '_getDriverVersion()', 142, string(e), 'traceback.print_exc()') + self._logger.logprb(SEVERE, 'OptionsDialog', '_getDriverVersion()', 112, e, traceback.format_exc()) return version def _updateArchive(self, driver, archive):