diff options
Diffstat (limited to 'ms_specific_proxyservice')
-rw-r--r-- | ms_specific_proxyservice/src/main/java/at/asitplus/eidas/specific/config/LoggerContextConfiguration.java | 69 | ||||
-rw-r--r-- | ms_specific_proxyservice/src/main/resources/logback.xml | 3 |
2 files changed, 72 insertions, 0 deletions
diff --git a/ms_specific_proxyservice/src/main/java/at/asitplus/eidas/specific/config/LoggerContextConfiguration.java b/ms_specific_proxyservice/src/main/java/at/asitplus/eidas/specific/config/LoggerContextConfiguration.java new file mode 100644 index 00000000..30312160 --- /dev/null +++ b/ms_specific_proxyservice/src/main/java/at/asitplus/eidas/specific/config/LoggerContextConfiguration.java @@ -0,0 +1,69 @@ +package at.asitplus.eidas.specific.config; + +import ch.qos.logback.classic.Level; +import ch.qos.logback.classic.Logger; +import ch.qos.logback.classic.LoggerContext; +import ch.qos.logback.classic.spi.LoggerContextListener; +import ch.qos.logback.core.Context; +import ch.qos.logback.core.spi.ContextAwareBase; +import ch.qos.logback.core.spi.LifeCycle; + +public class LoggerContextConfiguration extends ContextAwareBase implements LoggerContextListener, LifeCycle { + + private static final String APPLICATION_IDENITIFER = "proxyservice"; + private static final String LOGBACK_PARAM = "appId"; + + private boolean started = false; + + @Override + public void start() { + if (!started) { + Context context = getContext(); + context.putProperty(LOGBACK_PARAM, APPLICATION_IDENITIFER); + started = true; + + } + } + + @Override + public void stop() { + // TODO Auto-generated method stub + + } + + @Override + public boolean isStarted() { + return started; + + } + + @Override + public boolean isResetResistant() { + return true; + } + + @Override + public void onStart(LoggerContext context) { + // TODO Auto-generated method stub + + } + + @Override + public void onReset(LoggerContext context) { + // TODO Auto-generated method stub + + } + + @Override + public void onStop(LoggerContext context) { + // TODO Auto-generated method stub + + } + + @Override + public void onLevelChange(Logger logger, Level level) { + // TODO Auto-generated method stub + + } + +} diff --git a/ms_specific_proxyservice/src/main/resources/logback.xml b/ms_specific_proxyservice/src/main/resources/logback.xml index 9679d9e4..be87a170 100644 --- a/ms_specific_proxyservice/src/main/resources/logback.xml +++ b/ms_specific_proxyservice/src/main/resources/logback.xml @@ -8,6 +8,9 @@ <!-- http://www.qos.ch/shop/products/professionalSupport --> <!-- --> <configuration> + + <contextListener class="at.asitplus.eidas.specific.config.LoggerContextConfiguration"/> + <appender name="console" class="ch.qos.logback.core.ConsoleAppender"> <encoder> |