Search in sources :

Example 1 with LoggingApiOutputListDTO

use of org.wso2.carbon.apimgt.rest.api.devops.dto.LoggingApiOutputListDTO in project carbon-apimgt by wso2.

the class TenantLogsApiServiceImpl method tenantLogsTenantIdApisApiIdGet.

public Response tenantLogsTenantIdApisApiIdGet(String tenantId, String apiId, MessageContext messageContext) throws APIManagementException {
    APILoggingImpl apiLoggingImpl = new APILoggingImpl();
    List<APILogInfoDTO> apiLogInfoDTOList = apiLoggingImpl.getAPILoggerListByApiId(tenantId, apiId);
    LoggingApiOutputListDTO loggingApiOutputListDT = DevopsAPIUtils.getLoggingAPIList(apiLogInfoDTOList);
    return Response.ok().entity(loggingApiOutputListDT).build();
}
Also used : APILogInfoDTO(org.wso2.carbon.apimgt.impl.dto.APILogInfoDTO) LoggingApiOutputListDTO(org.wso2.carbon.apimgt.rest.api.devops.dto.LoggingApiOutputListDTO) APILoggingImpl(org.wso2.carbon.apimgt.devops.impl.logging.APILoggingImpl)

Example 2 with LoggingApiOutputListDTO

use of org.wso2.carbon.apimgt.rest.api.devops.dto.LoggingApiOutputListDTO in project carbon-apimgt by wso2.

the class DevopsAPIUtils method getLoggingAPIList.

public static LoggingApiOutputListDTO getLoggingAPIList(List<APILogInfoDTO> apiLogInfoDTOList) {
    LoggingApiOutputListDTO loggingApiOutputListDTO = new LoggingApiOutputListDTO();
    List<LoggingApiOutputDTO> loggingApiOutputDTOList = new ArrayList<>();
    for (APILogInfoDTO apiLogInfoDTO : apiLogInfoDTOList) {
        LoggingApiOutputDTO loggingApiOutputDTO = new LoggingApiOutputDTO();
        loggingApiOutputDTO.setContext(apiLogInfoDTO.getContext());
        loggingApiOutputDTO.setLogLevel(apiLogInfoDTO.getLogLevel());
        loggingApiOutputDTO.setApiId(apiLogInfoDTO.getApiId());
        loggingApiOutputDTOList.add(loggingApiOutputDTO);
    }
    loggingApiOutputListDTO.apis(loggingApiOutputDTOList);
    return loggingApiOutputListDTO;
}
Also used : ArrayList(java.util.ArrayList) APILogInfoDTO(org.wso2.carbon.apimgt.impl.dto.APILogInfoDTO) LoggingApiOutputDTO(org.wso2.carbon.apimgt.rest.api.devops.dto.LoggingApiOutputDTO) LoggingApiOutputListDTO(org.wso2.carbon.apimgt.rest.api.devops.dto.LoggingApiOutputListDTO)

Example 3 with LoggingApiOutputListDTO

use of org.wso2.carbon.apimgt.rest.api.devops.dto.LoggingApiOutputListDTO in project carbon-apimgt by wso2.

the class TenantLogsApiServiceImpl method tenantLogsTenantIdApisGet.

public Response tenantLogsTenantIdApisGet(String tenantId, String logLevel, MessageContext messageContext) throws APIManagementException {
    APILoggingImpl apiLoggingImpl = new APILoggingImpl();
    List<APILogInfoDTO> apiLogInfoDTOList = apiLoggingImpl.getAPILoggerList(tenantId, logLevel);
    LoggingApiOutputListDTO loggingApiOutputListDTO = DevopsAPIUtils.getLoggingAPIList(apiLogInfoDTOList);
    return Response.ok().entity(loggingApiOutputListDTO).build();
}
Also used : APILogInfoDTO(org.wso2.carbon.apimgt.impl.dto.APILogInfoDTO) LoggingApiOutputListDTO(org.wso2.carbon.apimgt.rest.api.devops.dto.LoggingApiOutputListDTO) APILoggingImpl(org.wso2.carbon.apimgt.devops.impl.logging.APILoggingImpl)

Aggregations

APILogInfoDTO (org.wso2.carbon.apimgt.impl.dto.APILogInfoDTO)3 LoggingApiOutputListDTO (org.wso2.carbon.apimgt.rest.api.devops.dto.LoggingApiOutputListDTO)3 APILoggingImpl (org.wso2.carbon.apimgt.devops.impl.logging.APILoggingImpl)2 ArrayList (java.util.ArrayList)1 LoggingApiOutputDTO (org.wso2.carbon.apimgt.rest.api.devops.dto.LoggingApiOutputDTO)1