Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add flag to disable logger timer #8789

Merged
merged 2 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ public class AppConfiguration implements Configuration, Serializable {
private Boolean metricReporterEnabled;
@DocProperty(description = "Boolean value specifying whether to enable JDK Loggers")
private Boolean disableJdkLogger = true;
@DocProperty(description = "Boolean value specifying whether to enable the logger refresh timer")
private boolean disableLoggerTimer;
@DocProperty(description = "Boolean value specifying whether to enable local in-memory cache")
private Boolean useLocalCache = false;
@DocProperty(description = "Boolean value specifying whether to bypass the validation defined upon the password attribute")
Expand Down Expand Up @@ -191,6 +193,14 @@ public void setDisableJdkLogger(Boolean disableJdkLogger) {
this.disableJdkLogger = disableJdkLogger;
}

public boolean isDisableLoggerTimer() {
return disableLoggerTimer;
}

public void setDisableLoggerTimer(boolean disableLoggerTimer) {
this.disableLoggerTimer = disableLoggerTimer;
}

public Boolean getUseLocalCache() {
return useLocalCache;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,14 @@ public void applicationInitialized(@Observes @Initialized(ApplicationScoped.clas
quartzSchedulerManager.start();

configurationFactory.initTimer();
loggerService.initTimer(true);

boolean enableLoggerTimer = !configurationFactory.getAppConfiguration().isDisableLoggerTimer();
logger.debug("LoggerService timer is {}enabled!", enableLoggerTimer ? "": "not ");

if (enableLoggerTimer) {
loggerService.initTimer(true);
}

//externalScimService.init();
customScriptManager.initTimer(Arrays.asList(
CustomScriptType.SCIM, CustomScriptType.PERSISTENCE_EXTENSION, CustomScriptType.ID_GENERATOR));
Expand Down