Search in sources :

Example 1 with ClassLoggerConfigurationType

use of com.evolveum.midpoint.xml.ns._public.common.common_3.ClassLoggerConfigurationType in project midpoint by Evolveum.

the class LoggingConfigurationManager method prepareCommonAppenderHeader.

private static void prepareCommonAppenderHeader(StringBuilder sb, AppenderConfigurationType appender, LoggingConfigurationType config, String appenderClass) {
    sb.append("\t<appender name=\"").append(appender.getName()).append("\" class=\"" + appenderClass + "\">\n");
    //Apply profiling appender filter if necessary
    if (IDM_PROFILE_APPENDER.equals(appender.getName())) {
        for (ClassLoggerConfigurationType cs : config.getClassLogger()) {
            if (REQUEST_FILTER_LOGGER_CLASS_NAME.equals(cs.getPackage()) || PROFILING_ASPECT_LOGGER.endsWith(cs.getPackage())) {
                LOGGER.debug("Defining ProfilingLogbackFilter to {} appender.", appender.getName());
                sb.append(defineProfilingLogbackFilter());
            }
        }
    }
}
Also used : ClassLoggerConfigurationType(com.evolveum.midpoint.xml.ns._public.common.common_3.ClassLoggerConfigurationType)

Example 2 with ClassLoggerConfigurationType

use of com.evolveum.midpoint.xml.ns._public.common.common_3.ClassLoggerConfigurationType in project midpoint by Evolveum.

the class LoggingConfigPanel method addClassLoggerPerformed.

private void addClassLoggerPerformed(AjaxRequestTarget target) {
    LoggingDto dto = getModel().getObject();
    ClassLogger logger = new ClassLogger(new ClassLoggerConfigurationType());
    logger.setEditing(true);
    dto.getLoggers().add(logger);
    TablePanel loggersTable = getLoggersTable();
    adjustLoggersTablePage(loggersTable, dto);
    target.add(getLoggersTable());
}
Also used : ClassLoggerConfigurationType(com.evolveum.midpoint.xml.ns._public.common.common_3.ClassLoggerConfigurationType) ClassLogger(com.evolveum.midpoint.web.page.admin.configuration.dto.ClassLogger) LoggingDto(com.evolveum.midpoint.web.page.admin.configuration.dto.LoggingDto) TablePanel(com.evolveum.midpoint.web.component.data.TablePanel)

Example 3 with ClassLoggerConfigurationType

use of com.evolveum.midpoint.xml.ns._public.common.common_3.ClassLoggerConfigurationType in project midpoint by Evolveum.

the class LoggingConfigPanel method addComponentLoggerPerformed.

private void addComponentLoggerPerformed(AjaxRequestTarget target) {
    LoggingDto dto = getModel().getObject();
    ComponentLogger logger = new ComponentLogger(new ClassLoggerConfigurationType());
    logger.setEditing(true);
    dto.getLoggers().add(logger);
    TablePanel loggersTable = getLoggersTable();
    adjustLoggersTablePage(loggersTable, dto);
    target.add(loggersTable);
}
Also used : ClassLoggerConfigurationType(com.evolveum.midpoint.xml.ns._public.common.common_3.ClassLoggerConfigurationType) LoggingDto(com.evolveum.midpoint.web.page.admin.configuration.dto.LoggingDto) ComponentLogger(com.evolveum.midpoint.web.page.admin.configuration.dto.ComponentLogger) TablePanel(com.evolveum.midpoint.web.component.data.TablePanel)

Example 4 with ClassLoggerConfigurationType

use of com.evolveum.midpoint.xml.ns._public.common.common_3.ClassLoggerConfigurationType in project midpoint by Evolveum.

the class ProfilingDto method init.

private void init(ProfilingConfigurationType profilingConfiguration, List<ClassLoggerConfigurationType> classLoggerConfig) {
    if (profilingConfiguration != null) {
        profilingEnabled = checkXsdBooleanValue(profilingConfiguration.isEnabled());
        requestFilter = checkXsdBooleanValue(profilingConfiguration.isRequestFilter());
        performanceStatistics = checkXsdBooleanValue(profilingConfiguration.isPerformanceStatistics());
        subsystemModel = checkXsdBooleanValue(profilingConfiguration.isModel());
        subsystemProvisioning = checkXsdBooleanValue(profilingConfiguration.isProvisioning());
        subsystemRepository = checkXsdBooleanValue(profilingConfiguration.isRepository());
        subsystemSynchronizationService = checkXsdBooleanValue(profilingConfiguration.isSynchronizationService());
        subsystemTaskManager = checkXsdBooleanValue(profilingConfiguration.isTaskManager());
        subsystemUcf = checkXsdBooleanValue(profilingConfiguration.isUcf());
        subsystemWorkflow = checkXsdBooleanValue(profilingConfiguration.isWorkflow());
        if (profilingConfiguration.getDumpInterval() != null) {
            dumpInterval = profilingConfiguration.getDumpInterval();
        }
    }
    if (classLoggerConfig == null) {
        return;
    }
    for (ClassLoggerConfigurationType logger : classLoggerConfig) {
        if (LOGGER_PROFILING.equals(logger.getPackage())) {
            setProfilingAppender(logger.getAppender() != null && logger.getAppender().size() > 0 ? logger.getAppender().get(0) : null);
            setProfilingLevel(ProfilingLevel.fromLoggerLevelType(logger.getLevel()));
            continue;
        }
    }
}
Also used : ClassLoggerConfigurationType(com.evolveum.midpoint.xml.ns._public.common.common_3.ClassLoggerConfigurationType)

Example 5 with ClassLoggerConfigurationType

use of com.evolveum.midpoint.xml.ns._public.common.common_3.ClassLoggerConfigurationType in project midpoint by Evolveum.

the class ProfilingDto method getProfilingClassLogerConfig.

public ClassLoggerConfigurationType getProfilingClassLogerConfig() {
    if (getProfilingLevel() != null) {
        ClassLoggerConfigurationType type = new ClassLoggerConfigurationType();
        type.setPackage(ProfilingDto.LOGGER_PROFILING);
        type.setLevel(ProfilingLevel.toLoggerLevelType(getProfilingLevel()));
        if (StringUtils.isEmpty(getProfilingAppender())) {
            return type;
        }
        if (StringUtils.isNotEmpty(getProfilingAppender()) || !(PageSystemConfiguration.ROOT_APPENDER_INHERITANCE_CHOICE.equals(getProfilingAppender()))) {
            type.getAppender().add(getProfilingAppender());
        }
        return type;
    }
    return null;
}
Also used : ClassLoggerConfigurationType(com.evolveum.midpoint.xml.ns._public.common.common_3.ClassLoggerConfigurationType)

Aggregations

ClassLoggerConfigurationType (com.evolveum.midpoint.xml.ns._public.common.common_3.ClassLoggerConfigurationType)17 LoggingConfigurationType (com.evolveum.midpoint.xml.ns._public.common.common_3.LoggingConfigurationType)5 TablePanel (com.evolveum.midpoint.web.component.data.TablePanel)3 LoggingDto (com.evolveum.midpoint.web.page.admin.configuration.dto.LoggingDto)3 SubSystemLoggerConfigurationType (com.evolveum.midpoint.xml.ns._public.common.common_3.SubSystemLoggerConfigurationType)3 SystemConfigurationType (com.evolveum.midpoint.xml.ns._public.common.common_3.SystemConfigurationType)3 ObjectDelta (com.evolveum.midpoint.prism.delta.ObjectDelta)2 OperationResult (com.evolveum.midpoint.schema.result.OperationResult)2 Task (com.evolveum.midpoint.task.api.Task)2 LogfileTestTailer (com.evolveum.midpoint.test.util.LogfileTestTailer)2 AppenderConfigurationType (com.evolveum.midpoint.xml.ns._public.common.common_3.AppenderConfigurationType)2 AssignmentPolicyEnforcementType (com.evolveum.midpoint.xml.ns._public.common.common_3.AssignmentPolicyEnforcementType)2 AuditingConfigurationType (com.evolveum.midpoint.xml.ns._public.common.common_3.AuditingConfigurationType)2 CleanupPolicyType (com.evolveum.midpoint.xml.ns._public.common.common_3.CleanupPolicyType)2 FileAppenderConfigurationType (com.evolveum.midpoint.xml.ns._public.common.common_3.FileAppenderConfigurationType)2 ObjectType (com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType)2 Test (org.testng.annotations.Test)2 DummyConnector (com.evolveum.icf.dummy.connector.DummyConnector)1 IntegrationTestTools (com.evolveum.midpoint.test.IntegrationTestTools)1 ClassLogger (com.evolveum.midpoint.web.page.admin.configuration.dto.ClassLogger)1