Skip to content

Commit

Permalink
Merge pull request #310 from Nizernizer/main
Browse files Browse the repository at this point in the history
update : log update
  • Loading branch information
Nizernizer authored May 16, 2022
2 parents cc3d78c + 321915c commit 76e35ff
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public class IastProperties {
private String debugFlag = null;
private String isDownloadPackage;
private String logPort;
private String logAddress;
private String fallbackVersion;

private String propertiesFilePath;
Expand Down Expand Up @@ -224,6 +225,13 @@ public String getLogPort() {
return logPort;
}

public String getLogAddress() {
if (logAddress == null) {
logAddress = System.getProperty("dongtai.log.address");
}
return logAddress;
}

public String getFallbackVersion() {
if (fallbackVersion == null) {
fallbackVersion = System.getProperty("dongtai.fallback.version", "v2");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,17 @@ public static void confReplace(String path) {
}else if (temp.contains("${AGENT_ID}")){
temp = temp.replace("${AGENT_ID}",AgentRegisterReport.getAgentFlag().toString());
}else if (temp.contains("${OPENAPI}")){
String s = IastProperties.getInstance().getBaseUrl();
s = s.substring(s.indexOf("://") + 3, s.indexOf("/openapi"));
if(s.contains(":")){
s = s.substring(0,s.indexOf(":"));
String logAddress = IastProperties.getInstance().getLogAddress();
if (null == logAddress){
String s = IastProperties.getInstance().getBaseUrl();
s = s.substring(s.indexOf("://") + 3, s.indexOf("/openapi"));
if(s.contains(":")){
s = s.substring(0,s.indexOf(":"));
}
temp = temp.replace("${OPENAPI}", s);
}else {
temp = logAddress;
}
temp = temp.replace("${OPENAPI}", s);
}else if (temp.contains("${LOG_PORT}")){
temp = temp.replace("${LOG_PORT}",IastProperties.getInstance().getLogPort());
}else if (temp.contains("${LOG_PATH}")){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @author dongzhiyong@huoxian.cn
*/
public class Constants {
public static final String AGENT_VERSION_VALUE = "v1.7.0.test.2";
public static final String AGENT_VERSION_VALUE = "v1.7.0.test.3";
public final static String API_REPORT_UPLOAD = "/api/v1/report/upload";
public final static String SERVER_ADDRESS = "/api/v1/agent/update";
public final static String API_HOOK_PROFILE = "/api/v1/profiles";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46994,7 +46994,7 @@ org/hsqldb/jdbc/jdbcColumnMetaData
org/hsqldb/jdbc/jdbcDataSource
org/hsqldb/jdbc/jdbcDataSourceFactory
org/hsqldb/jdbc/JDBCDatabaseMetaData
org/hsqldb/jdbc/JDBCPreparedStatement
# org/hsqldb/jdbc/JDBCPreparedStatement
org/hsqldb/jdbc/jdbcParameterMetaData
org/hsqldb/jdbc/JDBCResultSet*
org/hsqldb/jdbc/jdbcSavepoint
Expand Down

0 comments on commit 76e35ff

Please sign in to comment.