Skip to content

Commit

Permalink
去掉无效的警告
Browse files Browse the repository at this point in the history
  • Loading branch information
heavyrian2012 committed Aug 19, 2022
1 parent d2cb842 commit 6fbecfb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions broker/src/main/java/io/moquette/server/Server.java
Original file line number Diff line number Diff line change
Expand Up @@ -369,9 +369,6 @@ private void initMediaServerConfig(IConfig config) {
private String getServerIp(IConfig config) {
String serverIp = config.getProperty(BrokerConstants.SERVER_IP_PROPERTY_NAME);
if (serverIp == null || serverIp.equals("0.0.0.0")) {
String warning = "警告:无效配置,server.ip不能为空,需要配置服务的公网IP地址或者域名才能在公网使用!!!\nIM服务将使用本地地址,只能在局域网内使用!";
System.out.println(warning);
LOG.error(warning);
serverIp = Utility.getLocalAddress().getHostAddress();
}
return serverIp;
Expand Down
2 changes: 1 addition & 1 deletion broker/src/main/java/win/liyufan/im/DBUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static void init(IConfig config) {
if (embedDB != null && embedDB.equals("1")) {
IsEmbedDB = true;
LOG.info("Use h2 database");
String warning = "您正在使用内置h2数据库,建议仅在开发验证或者用户数小于100人时才使用此数据库,其它情况建议使用MySQL。";
String warning = "您正在使用h2数据库,建议仅在开发验证或者用户数小于100人时才使用此数据库。正式上线时建议切换到MySQL数据库。";
System.out.println(warning);
LOG.warn(warning);
} else {
Expand Down

0 comments on commit 6fbecfb

Please sign in to comment.