File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
platform-agent/src/main/java/com/flow/platform/agent Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -240,6 +240,7 @@ private String collectionAgentInfo() {
240240 long total = runtime .totalMemory ();
241241 long free = runtime .freeMemory ();
242242 long use = total - free ;
243+
243244 Map <String , String > dic = new HashMap <>(7 );
244245 dic .put ("javaVersion" , javaVersion );
245246 dic .put ("osName" , osName );
@@ -248,6 +249,7 @@ private String collectionAgentInfo() {
248249 dic .put ("zone" , Config .zone ());
249250 dic .put ("name" , Config .name ());
250251 dic .put ("agentVersion" , Config .getProperty ("version" ));
252+
251253 return Jsonable .GSON_CONFIG .toJson (dic );
252254 }
253255
Original file line number Diff line number Diff line change 2020import com .flow .platform .domain .Jsonable ;
2121import com .flow .platform .util .ExceptionUtil ;
2222import com .flow .platform .util .Logger ;
23+ import com .flow .platform .util .StringUtil ;
2324import com .flow .platform .util .http .HttpClient ;
2425import com .flow .platform .util .http .HttpResponse ;
2526import com .flow .platform .util .zk .ZKClient ;
@@ -83,8 +84,8 @@ public static String getProperty(String name) {
8384 properties = new Properties ();
8485 properties .load (fileInputStream );
8586 } catch (Throwable e ) {
86- LOGGER .warn ( "get property from application.properties error %s" ,
87- ExceptionUtil . findRootCause ( e ). getMessage ()) ;
87+ LOGGER .error ( "Fail to load application.properties:" , e );
88+ return StringUtil . EMPTY ;
8889 }
8990 }
9091
You can’t perform that action at this time.
0 commit comments