diff options
author | Thomas <> | 2021-03-22 14:29:16 +0100 |
---|---|---|
committer | Thomas <> | 2021-03-22 14:29:16 +0100 |
commit | eb37b2c969c85ca966f0a0ad1d8b9941647a7f6a (patch) | |
tree | a9b3530df42c60606fd94e11f4332ec271c3cce3 /moaSig/moa-sig-lib | |
parent | 98a60035238377632af28a4c72966dfd7d37e363 (diff) | |
download | moa-sig-eb37b2c969c85ca966f0a0ad1d8b9941647a7f6a.tar.gz moa-sig-eb37b2c969c85ca966f0a0ad1d8b9941647a7f6a.tar.bz2 moa-sig-eb37b2c969c85ca966f0a0ad1d8b9941647a7f6a.zip |
update error-logging on start-up
Diffstat (limited to 'moaSig/moa-sig-lib')
-rw-r--r-- | moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/IaikConfigurator.java | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/IaikConfigurator.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/IaikConfigurator.java index 00ea64d..1a41499 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/IaikConfigurator.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/IaikConfigurator.java @@ -37,6 +37,9 @@ import iaik.server.modules.keys.KeyEntryID; import iaik.server.modules.keys.KeyModule; import iaik.server.modules.keys.KeyModuleFactory; +import java.io.PrintStream; +import java.io.PrintWriter; +import java.io.StringWriter; import java.security.Provider; import java.security.Security; import java.util.ArrayList; @@ -45,10 +48,13 @@ import java.util.List; import java.util.Map; import java.util.Set; +import org.slf4j.LoggerFactory; + import at.gv.egovernment.moa.spss.server.config.ConfigurationException; import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider; import at.gv.egovernment.moa.spss.server.config.KeyGroup; import at.gv.egovernment.moa.spss.server.config.KeyGroupEntry; +import at.gv.egovernment.moa.spss.server.init.SystemInitializer; import at.gv.egovernment.moa.spss.server.logging.TransactionId; import at.gv.egovernment.moa.spss.util.CertStoreConverter; import at.gv.egovernment.moa.spss.util.MessageProvider; @@ -64,6 +70,8 @@ import at.gv.egovernment.moaspss.logging.Logger; */ public class IaikConfigurator { + private static final org.slf4j.Logger logger = LoggerFactory.getLogger(IaikConfigurator.class); + /** The warnings encountered during configuration. */ private List warnings = new ArrayList(); @@ -116,13 +124,25 @@ public class IaikConfigurator { return configData; } catch (iaik.server.ConfigurationException e) { - throw new ConfigurationException("config.08", null, e); - } catch (Throwable t) { - throw new ConfigurationException("config.08", null, t); + logException(e); + throw new ConfigurationException("config.08", null, e); + + } catch (Throwable t) { + logException(t); + throw new ConfigurationException("config.08", null, t); + } } - /** + private void logException(Throwable e) { + StringWriter out = new StringWriter(); + PrintWriter writer = new PrintWriter(out); + e.printStackTrace(writer); + logger.error("IAIK_Module error: {}",out.toString()); + + } + +/** * Return the warnings encountered during configuration. * * @return The warnings. |