Skip to content

Commit

Permalink
MID-2615: Fixed saving profiling configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
mederly committed Oct 12, 2015
1 parent 6ebe1dc commit c9b549a
Showing 1 changed file with 6 additions and 18 deletions.
Expand Up @@ -309,10 +309,11 @@ private ProfilingConfigurationType createProfilingConfiguration(LoggingDto dto){
ProfilingConfigurationType config = new ProfilingConfigurationType();

if(dto.isPerformanceStatistics() || dto.isRequestFilter() || dto.isSubsystemModel() || dto.isSubsystemRepository() || dto.isSubsystemProvisioning()
|| dto.isSubsystemResourceObjectChangeListener() || dto.isSubsystemUcf() || dto.isSubsystemTaskManager() || dto.isSubsystemWorkflow())
|| dto.isSubsystemResourceObjectChangeListener() || dto.isSubsystemUcf() || dto.isSubsystemTaskManager() || dto.isSubsystemWorkflow()) {
config.setEnabled(true);
else
} else {
config.setEnabled(false);
}

LOGGER.info("Profiling enabled: " + config.isEnabled());

Expand Down Expand Up @@ -550,30 +551,17 @@ private SystemConfigurationType saveProfiling(AjaxRequestTarget target, SystemCo
// LoggingConfigurationType loggingConfig = null;
ProfilingConfigurationType profilingConfig = null;

if(profilingConfigPanel != null){
if (profilingConfigPanel != null) {
loggingDto = profilingConfigPanel.getModel().getObject();
// loggingConfig = createLoggingConfiguration(loggingDto);

// if(loggingConfig == null){
// target.add(getFeedbackPanel());
// target.add(get(ID_MAIN_FORM));
// return config;
// }

profilingConfig = createProfilingConfiguration(loggingDto);
if(profilingConfig == null){
if (profilingConfig == null) {
target.add(getFeedbackPanel());
target.add(get(ID_MAIN_FORM));
return config;
}
}

if(loggingConfigPanel != null){
// config.setLogging(loggingConfig);
config.setProfilingConfiguration(profilingConfig);
}



if (loggingDto.getProfilingLevel() != null) {
ClassLoggerConfigurationType type = createCustomClassLogger(LoggingDto.LOGGER_PROFILING,
ProfilingLevel.toLoggerLevelType(loggingDto.getProfilingLevel()), loggingDto.getProfilingAppender());
Expand Down

0 comments on commit c9b549a

Please sign in to comment.