Search in sources :

Example 1 with LogConfigsInner

use of org.wso2.ei.dashboard.core.rest.model.LogConfigsInner in project product-mi-tooling by wso2.

the class LogConfigDelegate method createLogConfigsObject.

private LogConfigs createLogConfigsObject(JsonArray logConfigsArray) {
    LogConfigs logConfigs = new LogConfigs();
    for (JsonElement element : logConfigsArray) {
        LogConfigsInner logConfigsInner = createLogConfig(element);
        logConfigs.add(logConfigsInner);
    }
    return logConfigs;
}
Also used : LogConfigs(org.wso2.ei.dashboard.core.rest.model.LogConfigs) JsonElement(com.google.gson.JsonElement) LogConfigsInner(org.wso2.ei.dashboard.core.rest.model.LogConfigsInner)

Example 2 with LogConfigsInner

use of org.wso2.ei.dashboard.core.rest.model.LogConfigsInner in project product-mi-tooling by wso2.

the class LogConfigDelegate method createLogConfig.

private LogConfigsInner createLogConfig(JsonElement element) {
    JsonObject logConfig = element.getAsJsonObject();
    LogConfigsInner logConfigsInner = new LogConfigsInner();
    logConfigsInner.setName(logConfig.get("loggerName").getAsString());
    logConfigsInner.setComponentName(logConfig.get("componentName").getAsString());
    logConfigsInner.setLevel(logConfig.get("level").getAsString());
    return logConfigsInner;
}
Also used : JsonObject(com.google.gson.JsonObject) LogConfigsInner(org.wso2.ei.dashboard.core.rest.model.LogConfigsInner)

Aggregations

LogConfigsInner (org.wso2.ei.dashboard.core.rest.model.LogConfigsInner)2 JsonElement (com.google.gson.JsonElement)1 JsonObject (com.google.gson.JsonObject)1 LogConfigs (org.wso2.ei.dashboard.core.rest.model.LogConfigs)1