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