JAMES-1958 Adding a log message when WebAdmin configuration file is absent

Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/20e362bf
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/20e362bf
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/20e362bf

Branch: refs/heads/master
Commit: 20e362bfcde3c83f4a51feef6bb97427d74d4473
Parents: 9db1633
Author: benwa <btell...@linagora.com>
Authored: Mon Mar 13 17:34:31 2017 +0700
Committer: benwa <btell...@linagora.com>
Committed: Wed Mar 15 09:02:31 2017 +0700

----------------------------------------------------------------------
 .../org/apache/james/modules/server/WebAdminServerModule.java    | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/20e362bf/server/container/guice/protocols/webadmin/src/main/java/org/apache/james/modules/server/WebAdminServerModule.java
----------------------------------------------------------------------
diff --git 
a/server/container/guice/protocols/webadmin/src/main/java/org/apache/james/modules/server/WebAdminServerModule.java
 
b/server/container/guice/protocols/webadmin/src/main/java/org/apache/james/modules/server/WebAdminServerModule.java
index 431d0d5..0af2cce 100644
--- 
a/server/container/guice/protocols/webadmin/src/main/java/org/apache/james/modules/server/WebAdminServerModule.java
+++ 
b/server/container/guice/protocols/webadmin/src/main/java/org/apache/james/modules/server/WebAdminServerModule.java
@@ -44,6 +44,8 @@ import org.apache.james.webadmin.routes.DomainRoutes;
 import org.apache.james.webadmin.routes.UserMailboxesRoutes;
 import org.apache.james.webadmin.routes.UserRoutes;
 import org.apache.james.webadmin.utils.JsonTransformer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.google.common.base.Throwables;
 import com.google.common.collect.ImmutableList;
@@ -56,6 +58,7 @@ import com.google.inject.multibindings.Multibinder;
 
 public class WebAdminServerModule extends AbstractModule {
 
+    private static final Logger LOGGER = 
LoggerFactory.getLogger(WebAdminServerModule.class);
     private static final boolean DEFAULT_JWT_DISABLED = false;
     private static final boolean DEFAULT_DISABLED = false;
     private static final String DEFAULT_NO_CORS_ORIGIN = null;
@@ -92,6 +95,7 @@ public class WebAdminServerModule extends AbstractModule {
                 .urlCORSOrigin(configurationFile.getString("cors.origin", 
DEFAULT_NO_CORS_ORIGIN))
                 .build();
         } catch (FileNotFoundException e) {
+            LOGGER.info("No webadmin.properties file. Disabling WebAdmin 
interface.");
             return WebAdminConfiguration.builder()
                 .disabled()
                 .build();


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org

Reply via email to