Log configuration details to ease debugging
[portal/ric-dashboard.git] / webapp-backend / src / main / java / org / oranosc / ric / portal / dash / config / XappManagerConfiguration.java
index 2818323..a980e16 100644 (file)
  */
 package org.oranosc.ric.portal.dash.config;
 
+import java.lang.invoke.MethodHandles;
+
 import org.oranosc.ric.xappmgr.client.api.DefaultApi;
 import org.oranosc.ric.xappmgr.client.invoker.ApiClient;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Profile;
 import org.springframework.util.Assert;
 import org.springframework.web.client.RestTemplate;
 
@@ -33,14 +38,18 @@ import org.springframework.web.client.RestTemplate;
  * container.
  */
 @Configuration
+@Profile("!mock")
 public class XappManagerConfiguration {
 
+       private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+
        // Populated by the autowired constructor
        private final String xappMgrBasepath;
 
        @Autowired
        public XappManagerConfiguration(@Value("${xappmgr.basepath}") final String xappMgrBasepath) {
                Assert.notNull(xappMgrBasepath, "base path must not be null");
+               logger.info("Configuring xApp Manager at base path {}", xappMgrBasepath);
                this.xappMgrBasepath = xappMgrBasepath;
        }