Skip to content

Commit 7339bc2

Browse files
committed
cleanup log about baseUri when deployed on non embedded server
1 parent eb9a061 commit 7339bc2

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

restx-servlet/src/main/java/restx/servlet/RestxMainRouterServlet.java

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,16 @@ public void init(ServletConfig config) throws ServletException {
5353
}
5454
}
5555
if (!baseUri.isPresent()) {
56-
logger.info("MINOR: baseUri cannot be found. Define it in restx.baseUri system property, or use Servlet 3+ API\n" +
57-
"Note that is has no effect on restx behavior, it's just that it won't be able" +
58-
" to properly display the startup banner.");
56+
if (baseServer == null) {
57+
// restx.baseServerUri is not set, we are most probably deployed on a server, not in embedded mode.
58+
logger.debug("MINOR: baseUri cannot be found. Define it in restx.baseUri system property\n" +
59+
"Note that is has no effect on restx behavior, it's just that it won't be able" +
60+
" to properly display the startup banner.");
61+
} else {
62+
logger.info("MINOR: baseUri cannot be found. Define it in restx.baseUri system property, or use Servlet 3+ API\n" +
63+
"Note that is has no effect on restx behavior, it's just that it won't be able" +
64+
" to properly display the startup banner.");
65+
}
5966
}
6067

6168
serverId = Optional.fromNullable(

0 commit comments

Comments
 (0)