class LogSettingsDiagnosticService implements Diagnostic {

    @Override
    public Map<DiagnosticAttribute, DiagnosticCallback> getDiagnosticData() {
    return new DiagnosticAttributeBuilder()
            .addDiagnosticAttribute(DiagnosticAttributeBuilder.LOG_SETTINGS, new DiagnosticCallback<Map<String, String>>() {
                @Override
                public Map<String, String> getDiagnosticAttributeValue() {
                    //Merge log settings with values from Global Properties List
                    Map<String, String> loggers = log4jSettingsService.getLoggers();
                    for (Map.Entry<String,String> entry : (Set<Map.Entry<String,String>>)(propertiesManagementService.entrySet())) {
                        String key = entry.getKey();
                        if (key.startsWith(Log4jPropertyChanger.PROPERTY_PREFIX)) {
                            loggers.put(Log4jPropertyChanger.parseKey(key), entry.getValue());
                        }
                    }
                    return generateLogSettingsWithDescription(loggers);
                }
            })
            .addDiagnosticAttribute(DiagnosticAttributeBuilder.GLOBAL_PROPERTIES_LIST, new DiagnosticCallback<Map<String, String>>() {
                @Override
                public Map<String, String> getDiagnosticAttributeValue() {
                    //Merge log settings with values from Global Properties List
                    Map<String, String> globalPropertiesList = new HashMap<String, String>();
                    for (Map.Entry<String, String> entry : (Set<Map.Entry<String, String>>) (propertiesManagementService.entrySet())) {
                        //TODO: Maybe need to add descriptions for it too.
                        globalPropertiesList.put(entry.getKey(), entry.getValue());
                    }
                    return globalPropertiesList;
                }
            }).build();
    }

}