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());
}
}
}
}
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());
}
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);
}
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;
}
}
}
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;
}
Aggregations