Skip to content
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 @@ -495,10 +495,16 @@ interface AsyncConfig {
/**
* Indicates whether to log asynchronously
*/
@WithParentName
@WithDefault("false")
boolean enable();

/**
* Indicates whether to log asynchronously
*/
@WithParentName
@Deprecated(forRemoval = true, since = "3.24")
Optional<Boolean> legacyEnable();

/**
* The queue length to use before flushing writing
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,8 @@ private static Handler configureConsoleHandler(
consoleHandler.setErrorManager(defaultErrorManager);
applyFilter(includeFilters, defaultErrorManager, cleanupFilter, config.filter(), namedFilters, consoleHandler);

Handler handler = config.async().enable() ? createAsyncHandler(config.async(), config.level(), consoleHandler)
Handler handler = config.async().legacyEnable().orElse(config.async().enable())
? createAsyncHandler(config.async(), config.level(), consoleHandler)
: consoleHandler;

if (color && launchMode.isDevOrTest() && !config.async().enable()) {
Expand Down Expand Up @@ -708,7 +709,7 @@ private static Handler configureFileHandler(final FileConfig config, final Error
handler.getErrorManager().error("Multiple file formatters were activated", null, ErrorManager.GENERIC_FAILURE);
}

if (config.async().enable()) {
if (config.async().legacyEnable().orElse(config.async().enable())) {
return createAsyncHandler(config.async(), config.level(), handler);
}
return handler;
Expand Down Expand Up @@ -790,7 +791,7 @@ private static Handler configureSyslogHandler(final LogRuntimeConfig.SyslogConfi
ErrorManager.GENERIC_FAILURE);
}

if (config.async().enable()) {
if (config.async().legacyEnable().orElse(config.async().enable())) {
return createAsyncHandler(config.async(), config.level(), handler);
}
return handler;
Expand Down Expand Up @@ -837,7 +838,7 @@ private static Handler configureSocketHandler(final LogRuntimeConfig.SocketConfi
ErrorManager.GENERIC_FAILURE);
}

if (config.async().enable()) {
if (config.async().legacyEnable().orElse(config.async().enable())) {
return createAsyncHandler(config.async(), config.level(), handler);
}
return handler;
Expand Down
Loading