Skip to content

Commit

Permalink
Fix issues in getting per API logging levels
Browse files Browse the repository at this point in the history
  • Loading branch information
RakhithaRR committed Oct 8, 2024
1 parent 47e3c46 commit 6748714
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ public List<APILogInfoDTO> retrieveAPILoggerList(String organization, String log
}
}
} catch (SQLException e) {
handleException("Failed to retrieve API logging for organization" + organization, e);
handleException("Failed to retrieve API logging for organization " + organization, e);

Check warning on line 196 in components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dao/LoggingMgtDAO.java

View check run for this annotation

Codecov / codecov/patch

components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dao/LoggingMgtDAO.java#L196

Added line #L196 was not covered by tests
}
return apiLogInfoDTOList;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3154,34 +3154,34 @@ public class SQLConstants {
"ORGANIZATION= ?) AND HTTP_METHOD = ? AND URL_PATTERN = ?";
public static final String RETRIEVE_PER_API_LOGGING_OFF_SQL =
"SELECT AM_API.API_UUID, AM_API.LOG_LEVEL, AM_API.API_NAME, AM_API.CONTEXT, AM_API.API_VERSION " +
"FROM AM_API WHERE AM_API.LOG_LEVEL = 'OFF' AND AM_API.ORGANIZATION=?";
"FROM AM_API WHERE AM_API.LOG_LEVEL = 'OFF' AND AM_API.ORGANIZATION = ?";
public static final String RETRIEVE_PER_API_RESOURCE_LOGGING_OFF_SQL =
"SELECT AM_API.API_UUID, AUM.LOG_LEVEL, AM_API.API_NAME, AUM.HTTP_METHOD, AUM.URL_PATTERN, " +
"AM_API.CONTEXT, AM_API.API_VERSION FROM AM_API INNER JOIN " +
"AM_API_URL_MAPPING AUM ON AUM.API_ID = AM_API.API_ID WHERE AUM.LOG_LEVEL = 'OFF' " +
"AND AM_API.ORGANIZATION= ? AND AUM.REVISION_UUID IS NULL";
"AND AM_API.ORGANIZATION = ? AND AUM.REVISION_UUID IS NULL";
public static final String RETRIEVE_PER_API_LOGGING_BASIC_SQL =
"SELECT AM_API.API_UUID, AM_API.LOG_LEVEL, AM_API.API_NAME, AM_API.CONTEXT, AM_API.API_VERSION " +
"FROM AM_API WHERE AM_API.LOG_LEVEL = 'BASIC' AND AM_API.ORGANIZATION=?";
"FROM AM_API WHERE AM_API.LOG_LEVEL = 'BASIC' AND AM_API.ORGANIZATION = ?";
public static final String RETRIEVE_PER_API_RESOURCE_LOGGING_BASIC_SQL =
"SELECT AM_API.API_UUID, AUM.LOG_LEVEL, AM_API.API_NAME, AUM.HTTP_METHOD, AUM.URL_PATTERN, " +
"AM_API.CONTEXT, AM_API.API_VERSION FROM AM_API INNER JOIN AM_API_URL_MAPPING AUM ON " +
"AUM.API_ID = AM_API.API_ID WHERE AUM.LOG_LEVEL = 'BASIC' AND AM_API.ORGANIZATION= ?" +
"AUM.API_ID = AM_API.API_ID WHERE AUM.LOG_LEVEL = 'BASIC' AND AM_API.ORGANIZATION = ? " +
"AND AUM.REVISION_UUID IS NULL";
public static final String RETRIEVE_PER_API_LOGGING_STANDARD_SQL =
"SELECT AM_API.API_UUID, AM_API.LOG_LEVEL, AM_API.API_NAME, AM_API.CONTEXT, AM_API.API_VERSION " +
"FROM AM_API WHERE AM_API.LOG_LEVEL = 'STANDARD' AND AM_API.ORGANIZATION=?";
"FROM AM_API WHERE AM_API.LOG_LEVEL = 'STANDARD' AND AM_API.ORGANIZATION = ?";
public static final String RETRIEVE_PER_API_RESOURCE_LOGGING_STANDARD_SQL =
"SELECT AM_API.API_UUID, AUM.LOG_LEVEL, AM_API.API_NAME, AUM.HTTP_METHOD, AUM.URL_PATTERN, AM_API.CONTEXT," +
" AM_API.API_VERSION FROM AM_API INNER JOIN AM_API_URL_MAPPING AUM ON AUM.API_ID = AM_API.API_ID " +
"WHERE AUM.LOG_LEVEL = 'STANDARD' AND AM_API.ORGANIZATION= ? AND AUM.REVISION_UUID IS NULL";
"WHERE AUM.LOG_LEVEL = 'STANDARD' AND AM_API.ORGANIZATION = ? AND AUM.REVISION_UUID IS NULL";
public static final String RETRIEVE_PER_API_LOGGING_FULL_SQL =
"SELECT AM_API.API_UUID, AM_API.LOG_LEVEL, AM_API.API_NAME, AM_API.CONTEXT, AM_API.API_VERSION " +
"FROM AM_API WHERE AM_API.LOG_LEVEL = 'FULL' AND AM_API.ORGANIZATION=?";
"FROM AM_API WHERE AM_API.LOG_LEVEL = 'FULL' AND AM_API.ORGANIZATION = ?";
public static final String RETRIEVE_PER_API_RESOURCE_LOGGING_FULL_SQL =
"SELECT AM_API.API_UUID, AUM.LOG_LEVEL, AM_API.API_NAME, AUM.HTTP_METHOD, AUM.URL_PATTERN, " +
"AM_API.CONTEXT, AM_API.API_VERSION FROM AM_API INNER JOIN AM_API_URL_MAPPING AUM ON " +
"AUM.API_ID = AM_API.API_ID WHERE AUM.LOG_LEVEL = 'FULL' AND AM_API.ORGANIZATION= ?" +
"AUM.API_ID = AM_API.API_ID WHERE AUM.LOG_LEVEL = 'FULL' AND AM_API.ORGANIZATION = ? " +
"AND AUM.REVISION_UUID IS NULL";
public static final String RETRIEVE_ALL_PER_API_LOGGING_SQL =
"SELECT AM_API.API_UUID, AM_API.LOG_LEVEL, AM_API.API_NAME, AM_API.CONTEXT, AM_API.API_VERSION " +
Expand All @@ -3192,18 +3192,18 @@ public class SQLConstants {
"WHERE AUM.LOG_LEVEL <> 'OFF' AND AUM.REVISION_UUID IS NULL";
public static final String RETRIEVE_PER_API_LOGGING_ALL_SQL =
"SELECT AM_API.API_UUID, AM_API.LOG_LEVEL, AM_API.API_NAME, AM_API.CONTEXT, AM_API.API_VERSION " +
"FROM AM_API WHERE AM_API.ORGANIZATION=?";
"FROM AM_API WHERE AM_API.ORGANIZATION = ?";
public static final String RETRIEVE_PER_API_RESOURCE_LOGGING_ALL_SQL =
"SELECT API.API_UUID, AUM.LOG_LEVEL, AUM.HTTP_METHOD, AUM.URL_PATTERN, API.API_NAME, API.CONTEXT," +
" API.API_VERSION FROM AM_API API INNER JOIN AM_API_URL_MAPPING AUM ON " +
"AUM.API_ID = API.API_ID WHERE API.ORGANIZATION= ? AND AUM.REVISION_UUID IS NULL";
"AUM.API_ID = API.API_ID WHERE API.ORGANIZATION = ? AND AUM.REVISION_UUID IS NULL";
public static final String RETRIEVE_PER_API_LOGGING_BY_UUID_SQL =
"SELECT AM_API.API_UUID, AM_API.LOG_LEVEL, AM_API.API_NAME, AM_API.CONTEXT, AM_API.API_VERSION " +
"FROM AM_API WHERE AM_API.API_UUID = ? AND AM_API.ORGANIZATION=?";
"FROM AM_API WHERE AM_API.API_UUID = ? AND AM_API.ORGANIZATION = ?";
public static final String RETRIEVE_PER_API_RESOURCE_LOGGING_BY_UUID_SQL =
"SELECT API.API_UUID, AUM.LOG_LEVEL, API.API_NAME, AUM.HTTP_METHOD ,AUM.URL_PATTERN , API.CONTEXT, " +
"API.API_VERSION FROM AM_API API INNER JOIN AM_API_URL_MAPPING AUM ON " +
"AUM.API_ID = API.API_ID WHERE API.API_UUID = ? AND API.ORGANIZATION= ? AND AUM.REVISION_UUID " +
"AUM.API_ID = API.API_ID WHERE API.API_UUID = ? AND API.ORGANIZATION = ? AND AUM.REVISION_UUID " +
"IS NULL";
public static final String GATEWAY_LABEL_REGEX = "_GATEWAY_LABELS_";
public static final String API_ID_REGEX = "_API_IDS_";
Expand Down

0 comments on commit 6748714

Please sign in to comment.