mirror of
https://github.com/keycloak/keycloak.git
synced 2026-01-09 23:12:06 -03:30
fix: moves unsupported feature logging (#42380)
closes: #42334 Signed-off-by: Steve Hawkins <shawkins@redhat.com>
This commit is contained in:
parent
05c7c625d3
commit
0897560513
@ -342,8 +342,7 @@ public class Profile {
|
|||||||
|
|
||||||
verifyConfig(features);
|
verifyConfig(features);
|
||||||
|
|
||||||
CURRENT = new Profile(profile, features);
|
return init(profile, features);
|
||||||
return CURRENT;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean isEnabledByDefault(ProfileName profile, Feature f) {
|
private static boolean isEnabledByDefault(ProfileName profile, Feature f) {
|
||||||
@ -426,8 +425,6 @@ public class Profile {
|
|||||||
private Profile(ProfileName profileName, Map<Feature, Boolean> features) {
|
private Profile(ProfileName profileName, Map<Feature, Boolean> features) {
|
||||||
this.profileName = profileName;
|
this.profileName = profileName;
|
||||||
this.features = Collections.unmodifiableMap(features);
|
this.features = Collections.unmodifiableMap(features);
|
||||||
|
|
||||||
logUnsupportedFeatures();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Profile getInstance() {
|
public static Profile getInstance() {
|
||||||
@ -507,7 +504,7 @@ public class Profile {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void logUnsupportedFeatures() {
|
public void logUnsupportedFeatures() {
|
||||||
logUnsupportedFeatures(Feature.Type.PREVIEW, getPreviewFeatures(), Logger.Level.INFO);
|
logUnsupportedFeatures(Feature.Type.PREVIEW, getPreviewFeatures(), Logger.Level.INFO);
|
||||||
logUnsupportedFeatures(Feature.Type.EXPERIMENTAL, getExperimentalFeatures(), Logger.Level.WARN);
|
logUnsupportedFeatures(Feature.Type.EXPERIMENTAL, getExperimentalFeatures(), Logger.Level.WARN);
|
||||||
logUnsupportedFeatures(Feature.Type.DEPRECATED, getDeprecatedFeatures(), Logger.Level.WARN);
|
logUnsupportedFeatures(Feature.Type.DEPRECATED, getDeprecatedFeatures(), Logger.Level.WARN);
|
||||||
|
|||||||
@ -251,6 +251,10 @@ class KeycloakProcessor {
|
|||||||
void configureProfile(KeycloakRecorder recorder) {
|
void configureProfile(KeycloakRecorder recorder) {
|
||||||
Profile profile = getCurrentOrCreateFeatureProfile();
|
Profile profile = getCurrentOrCreateFeatureProfile();
|
||||||
|
|
||||||
|
if (!Environment.isRebuildCheck()) {
|
||||||
|
profile.logUnsupportedFeatures();
|
||||||
|
}
|
||||||
|
|
||||||
// record the features so that they are not calculated again at runtime
|
// record the features so that they are not calculated again at runtime
|
||||||
recorder.configureProfile(profile.getName(), profile.getFeatures());
|
recorder.configureProfile(profile.getName(), profile.getFeatures());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,6 +18,7 @@ package org.keycloak.services.resources;
|
|||||||
|
|
||||||
import org.jboss.logging.Logger;
|
import org.jboss.logging.Logger;
|
||||||
import org.keycloak.Config;
|
import org.keycloak.Config;
|
||||||
|
import org.keycloak.common.Profile;
|
||||||
import org.keycloak.common.crypto.CryptoIntegration;
|
import org.keycloak.common.crypto.CryptoIntegration;
|
||||||
import org.keycloak.config.ConfigProviderFactory;
|
import org.keycloak.config.ConfigProviderFactory;
|
||||||
import org.keycloak.exportimport.ExportImportConfig;
|
import org.keycloak.exportimport.ExportImportConfig;
|
||||||
@ -58,7 +59,7 @@ public abstract class KeycloakApplication extends Application {
|
|||||||
try {
|
try {
|
||||||
|
|
||||||
logger.debugv("PlatformProvider: {0}", platform.getClass().getName());
|
logger.debugv("PlatformProvider: {0}", platform.getClass().getName());
|
||||||
|
Profile.getInstance().logUnsupportedFeatures();
|
||||||
loadConfig();
|
loadConfig();
|
||||||
|
|
||||||
platform.onStartup(this::startup);
|
platform.onStartup(this::startup);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user