Loading bundles/es.core/src/info/elexis/server/core/eenv/ElexisEnvironmentActivator.java +13 −3 Original line number Diff line number Diff line Loading @@ -13,6 +13,11 @@ import ch.qos.logback.classic.LoggerContext; import ch.qos.logback.classic.spi.ILoggingEvent; import ch.qos.logback.core.Appender; /** * This service is programmatically activated via * * @see ElexisEnvironmentServiceActivator */ @Component public class ElexisEnvironmentActivator { Loading @@ -25,14 +30,19 @@ public class ElexisEnvironmentActivator { @Activate public void activate() { String hostname = elexisEnvironmentService.getHostname(); activateRocketChatLogAppender(hostname); // IS ROCKETCHAT ENABLED? configureRocketchatIntegration(hostname); } private void activateRocketChatLogAppender(String hostname) { private void configureRocketchatIntegration(String hostname) { String rocketchatIntegrationToken = elexisEnvironmentService.getProperty("EE_RC_ES_INTEGRATION_WEBHOOK_TOKEN"); String rocketchatIntegrationUrl = "https://" + hostname + "/chat/hooks/" + rocketchatIntegrationToken; // pass the integration token to RocketchatMessageTransporter contextService.getRootContext().setNamed("rocketchat-station-integration-token", rocketchatIntegrationToken); LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory(); Logger slf4jRootLogger = lc.getLogger(org.slf4j.Logger.ROOT_LOGGER_NAME); ch.qos.logback.classic.Logger rootLogger = (ch.qos.logback.classic.Logger) slf4jRootLogger; Loading bundles/es.core/src/info/elexis/server/core/internal/service/ContextService.java +1 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ public class ContextService implements IContextService { @Activate public void activate(){ rootContext = new Context(); rootContext.setNamed("IS_ELEXIS_SERVER", Boolean.TRUE.toString()); } @Override Loading Loading
bundles/es.core/src/info/elexis/server/core/eenv/ElexisEnvironmentActivator.java +13 −3 Original line number Diff line number Diff line Loading @@ -13,6 +13,11 @@ import ch.qos.logback.classic.LoggerContext; import ch.qos.logback.classic.spi.ILoggingEvent; import ch.qos.logback.core.Appender; /** * This service is programmatically activated via * * @see ElexisEnvironmentServiceActivator */ @Component public class ElexisEnvironmentActivator { Loading @@ -25,14 +30,19 @@ public class ElexisEnvironmentActivator { @Activate public void activate() { String hostname = elexisEnvironmentService.getHostname(); activateRocketChatLogAppender(hostname); // IS ROCKETCHAT ENABLED? configureRocketchatIntegration(hostname); } private void activateRocketChatLogAppender(String hostname) { private void configureRocketchatIntegration(String hostname) { String rocketchatIntegrationToken = elexisEnvironmentService.getProperty("EE_RC_ES_INTEGRATION_WEBHOOK_TOKEN"); String rocketchatIntegrationUrl = "https://" + hostname + "/chat/hooks/" + rocketchatIntegrationToken; // pass the integration token to RocketchatMessageTransporter contextService.getRootContext().setNamed("rocketchat-station-integration-token", rocketchatIntegrationToken); LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory(); Logger slf4jRootLogger = lc.getLogger(org.slf4j.Logger.ROOT_LOGGER_NAME); ch.qos.logback.classic.Logger rootLogger = (ch.qos.logback.classic.Logger) slf4jRootLogger; Loading
bundles/es.core/src/info/elexis/server/core/internal/service/ContextService.java +1 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ public class ContextService implements IContextService { @Activate public void activate(){ rootContext = new Context(); rootContext.setNamed("IS_ELEXIS_SERVER", Boolean.TRUE.toString()); } @Override Loading