Fix for Log handler specific log levels support only lower-case levels (#34865)

* fix for #34817

Signed-off-by: Kaustubh Bawankar <kbawanka@redhat.com>

* Fixes #34817

Signed-off-by: Kaustubh Bawankar <kbawanka@redhat.com>

* Added validator to LOG_CONSOLE_LEVEL and LOG_FILE_LEVEL

Signed-off-by: Kaustubh Bawankar <kbawanka@redhat.com>

* Added validateLogParameters

Signed-off-by: Kaustubh Bawankar <kbawanka@redhat.com>

* Added tests

Signed-off-by: Kaustubh Bawankar <kbawanka@redhat.com>

* Added tests

Signed-off-by: Kaustubh Bawankar <kbawanka@redhat.com>

* Fixed logging messaging

Signed-off-by: Kaustubh Bawankar <kbawanka@redhat.com>

* switching to a declarative case-insensitivity

Signed-off-by: Steve Hawkins <shawkins@redhat.com>

* Apply suggestions from code review

Co-authored-by: Martin Bartoš <mabartos@redhat.com>
Signed-off-by: Steven Hawkins <shawkins@redhat.com>

* refining suggested message changes

Signed-off-by: Steve Hawkins <shawkins@redhat.com>

---------

Signed-off-by: Kaustubh Bawankar <kbawanka@redhat.com>
Signed-off-by: Steve Hawkins <shawkins@redhat.com>
Signed-off-by: Steven Hawkins <shawkins@redhat.com>
Co-authored-by: Steve Hawkins <shawkins@redhat.com>
Co-authored-by: Martin Bartoš <mabartos@redhat.com>
This commit is contained in:
kaustubh-rh 2024-11-19 14:09:03 +05:30 committed by GitHub
parent ced8e643c9
commit c8f43ec216
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
21 changed files with 128 additions and 95 deletions

View File

@ -1,7 +1,6 @@
package org.keycloak.config;
import java.io.File;
import java.util.Set;
import java.util.stream.Collectors;
import java.util.stream.Stream;
@ -64,7 +63,7 @@ public class CachingOptions {
public static final Option<Stack> CACHE_STACK = new OptionBuilder<>("cache-stack", Stack.class)
.category(OptionCategory.CACHE)
.expectedValues(false)
.strictExpectedValues(false)
.description("Define the default stack to use for cluster communication and node discovery.")
.defaultValue(Stack.jdbc_ping)
.deprecatedValues(Stream.of(Stack.azure, Stack.ec2, Stack.google, Stack.tcp, Stack.udp, Stack.jdbc_ping_udp).map(Object::toString).collect(Collectors.toSet()), "Use 'jdbc-ping' instead")

View File

@ -79,6 +79,7 @@ public class LoggingOptions {
public static final Option<Level> LOG_CONSOLE_LEVEL = new OptionBuilder<>("log-console-level", Level.class)
.category(OptionCategory.LOGGING)
.caseInsensitiveExpectedValues(true)
.defaultValue(Level.ALL)
.description("Set the log level for the console handler. It specifies the most verbose log level for logs shown in the output. "
+ "It respects levels specified in the 'log-level' option, which represents the maximal verbosity for the whole logging system. "
@ -122,6 +123,7 @@ public class LoggingOptions {
public static final Option<Level> LOG_FILE_LEVEL = new OptionBuilder<>("log-file-level", Level.class)
.category(OptionCategory.LOGGING)
.caseInsensitiveExpectedValues(true)
.defaultValue(Level.ALL)
.description("Set the log level for the file handler. It specifies the most verbose log level for logs shown in the output. "
+ "It respects levels specified in the 'log-level' option, which represents the maximal verbosity for the whole logging system. "
@ -160,6 +162,7 @@ public class LoggingOptions {
public static final Option<Level> LOG_SYSLOG_LEVEL = new OptionBuilder<>("log-syslog-level", Level.class)
.category(OptionCategory.LOGGING)
.caseInsensitiveExpectedValues(true)
.defaultValue(Level.ALL)
.description("Set the log level for the Syslog handler. It specifies the most verbose log level for logs shown in the output. "
+ "It respects levels specified in the 'log-level' option, which represents the maximal verbosity for the whole logging system. "

View File

@ -15,9 +15,10 @@ public class Option<T> {
private final Optional<T> defaultValue;
private final List<String> expectedValues;
private final boolean strictExpectedValues;
private final boolean caseInsensitiveExpectedValues;
private final DeprecatedMetadata deprecatedMetadata;
public Option(Class<T> type, String key, OptionCategory category, boolean hidden, boolean buildTime, String description, Optional<T> defaultValue, List<String> expectedValues, boolean strictExpectedValues, DeprecatedMetadata deprecatedMetadata) {
public Option(Class<T> type, String key, OptionCategory category, boolean hidden, boolean buildTime, String description, Optional<T> defaultValue, List<String> expectedValues, boolean strictExpectedValues, boolean caseInsensitiveExpectedValues, DeprecatedMetadata deprecatedMetadata) {
this.type = type;
this.key = key;
this.category = category;
@ -27,6 +28,7 @@ public class Option<T> {
this.defaultValue = defaultValue;
this.expectedValues = expectedValues;
this.strictExpectedValues = strictExpectedValues;
this.caseInsensitiveExpectedValues = caseInsensitiveExpectedValues;
this.deprecatedMetadata = deprecatedMetadata;
}
@ -72,6 +74,10 @@ public class Option<T> {
return strictExpectedValues;
}
public boolean isCaseInsensitiveExpectedValues() {
return caseInsensitiveExpectedValues;
}
public Optional<DeprecatedMetadata> getDeprecatedMetadata() {
return Optional.ofNullable(deprecatedMetadata);
}
@ -87,6 +93,7 @@ public class Option<T> {
Optional.ofNullable(defaultValue),
this.expectedValues,
this.strictExpectedValues,
this.caseInsensitiveExpectedValues,
this.deprecatedMetadata
);
}

View File

@ -1,6 +1,6 @@
package org.keycloak.config;
import org.keycloak.common.util.CollectionUtil;
import io.smallrye.common.constraint.Assert;
import java.util.Collection;
import java.util.List;
@ -22,9 +22,10 @@ public class OptionBuilder<T> {
private boolean build;
private String description;
private Optional<T> defaultValue;
private List<String> expectedValues = List.of();
private List<String> expectedValues;
// Denotes whether a custom value can be provided among the expected values
private boolean strictExpectedValues;
private boolean caseInsensitiveExpectedValues;
private DeprecatedMetadata deprecatedMetadata;
public static <A> OptionBuilder<List<A>> listOptionBuilder(String key, Class<A> type) {
@ -81,40 +82,26 @@ public class OptionBuilder<T> {
}
public OptionBuilder<T> expectedValues(List<String> expected) {
return expectedValues(true, expected);
}
/**
* @param strict if only expected values are allowed, or some other custom value can be specified
* @param expected expected values
*/
public OptionBuilder<T> expectedValues(boolean strict, List<String> expected) {
this.strictExpectedValues = strict;
Assert.assertNotNull(expected);
this.expectedValues = expected;
return this;
}
public OptionBuilder<T> expectedValues(Class<? extends Enum> expected) {
return expectedValues(true, expected);
}
public OptionBuilder<T> expectedValues(boolean strict, Class<? extends Enum> expected) {
this.strictExpectedValues = strict;
this.expectedValues = Stream.of(expected.getEnumConstants()).map(Object::toString).collect(Collectors.toList());
return this;
return expectedValues(Stream.of(expected.getEnumConstants()).map(Object::toString).collect(Collectors.toList()));
}
public OptionBuilder<T> expectedValues(T ... expected) {
return expectedValues(true, expected);
return expectedValues(Stream.of(expected).map(Object::toString).collect(Collectors.toList()));
}
/**
* @param strict if only expected values are allowed, or some other custom value can be specified
* @param expected expected values - if empty and the {@link #type} or {@link #auxiliaryType} is enum, values are inferred
*/
public OptionBuilder<T> expectedValues(boolean strict, T... expected) {
this.strictExpectedValues = strict;
this.expectedValues = Stream.of(expected).map(Object::toString).collect(Collectors.toList());
public OptionBuilder<T> strictExpectedValues(boolean strictExpectedValues) {
this.strictExpectedValues = strictExpectedValues;
return this;
}
public OptionBuilder<T> caseInsensitiveExpectedValues(boolean caseInsensitiveExpectedValues) {
this.caseInsensitiveExpectedValues = caseInsensitiveExpectedValues;
return this;
}
@ -154,13 +141,13 @@ public class OptionBuilder<T> {
expected = auxiliaryType;
}
if (CollectionUtil.isEmpty(expectedValues)) {
if (expectedValues == null) {
if (Boolean.class.equals(expected)) {
expectedValues(strictExpectedValues, BOOLEAN_TYPE_VALUES);
}
if (Enum.class.isAssignableFrom(expected)) {
expectedValues(strictExpectedValues, (Class<? extends Enum>) expected);
expectedValues(BOOLEAN_TYPE_VALUES);
} else if (Enum.class.isAssignableFrom(expected)) {
expectedValues((Class<? extends Enum>) expected);
} else {
expectedValues = List.of();
}
}
@ -168,7 +155,7 @@ public class OptionBuilder<T> {
defaultValue = Optional.of((T) Boolean.FALSE);
}
return new Option<T>(type, key, category, hidden, build, description, defaultValue, expectedValues, strictExpectedValues, deprecatedMetadata);
return new Option<T>(type, key, category, hidden, build, description, defaultValue, expectedValues, strictExpectedValues, caseInsensitiveExpectedValues, deprecatedMetadata);
}
}

View File

@ -781,9 +781,13 @@ public class Picocli {
}).toList();
var isStrictExpectedValues = mapper.getOption().isStrictExpectedValues();
var isCaseInsensitiveExpectedValues = mapper.getOption().isCaseInsensitiveExpectedValues();
var printableValues = String.join(", ", decoratedExpectedValues) + (!isStrictExpectedValues ? ", or a custom one" : "");
transformedDesc.append(String.format(" Possible values are: %s.", printableValues));
transformedDesc.append(String.format(" Possible values are%s: %s.",
isCaseInsensitiveExpectedValues ? " (case insensitive)" : "",
printableValues)
);
}
mapper.getDefaultValue()

View File

@ -108,15 +108,26 @@ public class ShortErrorMessageHandler implements IParameterExceptionHandler {
private String[] getUnmatchedPartsByOptionSeparator(UnmatchedArgumentException uae, String separator) {
return uae.getUnmatched().get(0).split(separator);
}
private String getExpectedMessage(OptionSpec option) {
return String.format("Option '%s' (%s) expects %s.%s", String.join(", ", option.names()), option.paramLabel(),
option.typeInfo().isMultiValue() ? "one or more comma separated values without whitespace": "a single value",
getExpectedValuesMessage(option.completionCandidates()));
getExpectedValuesMessage(option.completionCandidates(), isCaseInsensitive(option)));
}
public static String getExpectedValuesMessage(Iterable<String> specCandidates) {
return specCandidates.iterator().hasNext() ? " Expected values are: " + String.join(", ", specCandidates) : "";
private boolean isCaseInsensitive(OptionSpec option) {
if (option.longestName().startsWith("--")) {
var mapper = PropertyMappers.getMapper(option.longestName().substring(2));
if (mapper != null) {
return mapper.getOption().isCaseInsensitiveExpectedValues();
}
}
return false;
}
public static String getExpectedValuesMessage(Iterable<String> specCandidates, boolean caseInsensitive) {
return specCandidates.iterator().hasNext() ? String.format(" Expected values are%s: %s",
caseInsensitive ? " (case insensitive)" : "", String.join(", ", specCandidates)) : "";
}
}

View File

@ -44,6 +44,7 @@ public final class LoggingPropertyMappers {
.isEnabled(LoggingPropertyMappers::isConsoleEnabled, CONSOLE_ENABLED_MSG)
.to("quarkus.log.console.level")
.paramLabel("level")
.transformer(LoggingPropertyMappers::upperCase)
.build(),
fromOption(LoggingOptions.LOG_CONSOLE_FORMAT)
.isEnabled(LoggingPropertyMappers::isConsoleEnabled, CONSOLE_ENABLED_MSG)
@ -78,6 +79,7 @@ public final class LoggingPropertyMappers {
.isEnabled(LoggingPropertyMappers::isFileEnabled, FILE_ENABLED_MSG)
.to("quarkus.log.file.level")
.paramLabel("level")
.transformer(LoggingPropertyMappers::upperCase)
.build(),
fromOption(LoggingOptions.LOG_FILE_FORMAT)
.isEnabled(LoggingPropertyMappers::isFileEnabled, FILE_ENABLED_MSG)
@ -116,6 +118,7 @@ public final class LoggingPropertyMappers {
.isEnabled(LoggingPropertyMappers::isSyslogEnabled, SYSLOG_ENABLED_MSG)
.to("quarkus.log.syslog.level")
.paramLabel("level")
.transformer(LoggingPropertyMappers::upperCase)
.build(),
fromOption(LoggingOptions.LOG_SYSLOG_APP_NAME)
.isEnabled(LoggingPropertyMappers::isSyslogEnabled, SYSLOG_ENABLED_MSG)
@ -248,4 +251,8 @@ public final class LoggingPropertyMappers {
return LoggingOptions.DEFAULT_LOG_TRACING_FORMAT;
}
private static String upperCase(String value, ConfigSourceInterceptorContext context) {
return value.toUpperCase(Locale.ROOT);
}
}

View File

@ -526,10 +526,12 @@ public class PropertyMapper<T> {
void validateExpectedValues(ConfigValue configValue, String v) {
List<String> expectedValues = getExpectedValues();
if (!expectedValues.isEmpty() && !expectedValues.contains(v) && getOption().isStrictExpectedValues()) {
if (!expectedValues.isEmpty() && getOption().isStrictExpectedValues() && !expectedValues.contains(v)
&& (!getOption().isCaseInsensitiveExpectedValues()
|| !expectedValues.stream().anyMatch(v::equalsIgnoreCase))) {
throw new PropertyException(
String.format("Invalid value for option %s: %s.%s", getOptionAndSourceMessage(configValue), v,
ShortErrorMessageHandler.getExpectedValuesMessage(expectedValues)));
ShortErrorMessageHandler.getExpectedValuesMessage(expectedValues, getOption().isCaseInsensitiveExpectedValues())));
}
}

View File

@ -131,7 +131,20 @@ public class PicocliTest extends AbstractConfigurationTest {
NonRunningPicocli nonRunningPicocli = pseudoLaunch("start-dev", "--log-console-level=wrong");
assertEquals(CommandLine.ExitCode.USAGE, nonRunningPicocli.exitCode);
assertThat(nonRunningPicocli.getErrString(), containsString(
"Invalid value for option '--log-console-level': wrong. Expected values are: off, fatal, error, warn, info, debug, trace, all"));
"Invalid value for option '--log-console-level': wrong. Expected values are (case insensitive): off, fatal, error, warn, info, debug, trace, all"));
}
@Test
public void passUpperCaseLogValue() {
NonRunningPicocli nonRunningPicocli = pseudoLaunch("start-dev", "--log-console-level=INFO");
assertEquals(CommandLine.ExitCode.OK, nonRunningPicocli.exitCode);
}
@Test
public void passMixedCaseLogValue() {
NonRunningPicocli nonRunningPicocli = pseudoLaunch("start-dev", "--log-console-level=Info");
assertEquals(CommandLine.ExitCode.OK, nonRunningPicocli.exitCode);
assertEquals("INFO", nonRunningPicocli.config.getConfigValue("quarkus.log.console.level").getValue());
}
@Test

View File

@ -179,9 +179,9 @@ public class LoggingConfigurationTest extends AbstractConfigurationTest {
assertExternalConfig(Map.of(
"quarkus.log.level", "DEBUG",
"quarkus.log.console.level", "info",
"quarkus.log.syslog.level", "trace",
"quarkus.log.file.level", "debug"
"quarkus.log.console.level", "INFO",
"quarkus.log.syslog.level", "TRACE",
"quarkus.log.file.level", "DEBUG"
));
}
}

View File

@ -178,7 +178,7 @@ public class LoggingDistTest {
@Launch({"start-dev", "--log-console-level=wrong"})
void wrongLevelForHandlers(LaunchResult result) {
CLIResult cliResult = (CLIResult) result;
cliResult.assertError("Invalid value for option '--log-console-level': wrong. Expected values are: off, fatal, error, warn, info, debug, trace, all");
cliResult.assertError("Invalid value for option '--log-console-level': wrong. Expected values are (case insensitive): off, fatal, error, warn, info, debug, trace, all");
}
@Test

View File

@ -132,8 +132,8 @@ Logging:
level for logs shown in the output. It respects levels specified in the
'log-level' option, which represents the maximal verbosity for the whole
logging system. For more information, check the Logging guide. Possible
values are: off, fatal, error, warn, info, debug, trace, all. Default: all.
Available only when Console log handler is activated.
values are (case insensitive): off, fatal, error, warn, info, debug, trace,
all. Default: all. Available only when Console log handler is activated.
--log-console-output <output>
Set the log output to JSON or default (plain) unstructured logging. Possible
values are: default, json. Default: default. Available only when Console log

View File

@ -136,8 +136,8 @@ Logging:
level for logs shown in the output. It respects levels specified in the
'log-level' option, which represents the maximal verbosity for the whole
logging system. For more information, check the Logging guide. Possible
values are: off, fatal, error, warn, info, debug, trace, all. Default: all.
Available only when Console log handler is activated.
values are (case insensitive): off, fatal, error, warn, info, debug, trace,
all. Default: all. Available only when Console log handler is activated.
--log-console-output <output>
Set the log output to JSON or default (plain) unstructured logging. Possible
values are: default, json. Default: default. Available only when Console log
@ -157,8 +157,8 @@ Logging:
level for logs shown in the output. It respects levels specified in the
'log-level' option, which represents the maximal verbosity for the whole
logging system. For more information, check the Logging guide. Possible
values are: off, fatal, error, warn, info, debug, trace, all. Default: all.
Available only when File log handler is activated.
values are (case insensitive): off, fatal, error, warn, info, debug, trace,
all. Default: all. Available only when File log handler is activated.
--log-file-output <output>
Set the log output to JSON or default (plain) unstructured logging. Possible
values are: default, json. Default: default. Available only when File log
@ -185,8 +185,8 @@ Logging:
level for logs shown in the output. It respects levels specified in the
'log-level' option, which represents the maximal verbosity for the whole
logging system. For more information, check the Logging guide. Possible
values are: off, fatal, error, warn, info, debug, trace, all. Default: all.
Available only when Syslog is activated.
values are (case insensitive): off, fatal, error, warn, info, debug, trace,
all. Default: all. Available only when Syslog is activated.
--log-syslog-max-length <max-length>
Set the maximum length, in bytes, of the message allowed to be sent. The
length includes the header and the message. If not set, the default value is

View File

@ -132,8 +132,8 @@ Logging:
level for logs shown in the output. It respects levels specified in the
'log-level' option, which represents the maximal verbosity for the whole
logging system. For more information, check the Logging guide. Possible
values are: off, fatal, error, warn, info, debug, trace, all. Default: all.
Available only when Console log handler is activated.
values are (case insensitive): off, fatal, error, warn, info, debug, trace,
all. Default: all. Available only when Console log handler is activated.
--log-console-output <output>
Set the log output to JSON or default (plain) unstructured logging. Possible
values are: default, json. Default: default. Available only when Console log

View File

@ -136,8 +136,8 @@ Logging:
level for logs shown in the output. It respects levels specified in the
'log-level' option, which represents the maximal verbosity for the whole
logging system. For more information, check the Logging guide. Possible
values are: off, fatal, error, warn, info, debug, trace, all. Default: all.
Available only when Console log handler is activated.
values are (case insensitive): off, fatal, error, warn, info, debug, trace,
all. Default: all. Available only when Console log handler is activated.
--log-console-output <output>
Set the log output to JSON or default (plain) unstructured logging. Possible
values are: default, json. Default: default. Available only when Console log
@ -157,8 +157,8 @@ Logging:
level for logs shown in the output. It respects levels specified in the
'log-level' option, which represents the maximal verbosity for the whole
logging system. For more information, check the Logging guide. Possible
values are: off, fatal, error, warn, info, debug, trace, all. Default: all.
Available only when File log handler is activated.
values are (case insensitive): off, fatal, error, warn, info, debug, trace,
all. Default: all. Available only when File log handler is activated.
--log-file-output <output>
Set the log output to JSON or default (plain) unstructured logging. Possible
values are: default, json. Default: default. Available only when File log
@ -185,8 +185,8 @@ Logging:
level for logs shown in the output. It respects levels specified in the
'log-level' option, which represents the maximal verbosity for the whole
logging system. For more information, check the Logging guide. Possible
values are: off, fatal, error, warn, info, debug, trace, all. Default: all.
Available only when Syslog is activated.
values are (case insensitive): off, fatal, error, warn, info, debug, trace,
all. Default: all. Available only when Syslog is activated.
--log-syslog-max-length <max-length>
Set the maximum length, in bytes, of the message allowed to be sent. The
length includes the header and the message. If not set, the default value is

View File

@ -298,8 +298,8 @@ Logging:
level for logs shown in the output. It respects levels specified in the
'log-level' option, which represents the maximal verbosity for the whole
logging system. For more information, check the Logging guide. Possible
values are: off, fatal, error, warn, info, debug, trace, all. Default: all.
Available only when Console log handler is activated.
values are (case insensitive): off, fatal, error, warn, info, debug, trace,
all. Default: all. Available only when Console log handler is activated.
--log-console-output <output>
Set the log output to JSON or default (plain) unstructured logging. Possible
values are: default, json. Default: default. Available only when Console log
@ -349,4 +349,4 @@ Bootstrap Admin:
Do NOT start the server using this command when deploying to production.
Use 'kc.sh start-dev --help-all' to list all available options, including build
options.
options.

View File

@ -337,8 +337,8 @@ Logging:
level for logs shown in the output. It respects levels specified in the
'log-level' option, which represents the maximal verbosity for the whole
logging system. For more information, check the Logging guide. Possible
values are: off, fatal, error, warn, info, debug, trace, all. Default: all.
Available only when Console log handler is activated.
values are (case insensitive): off, fatal, error, warn, info, debug, trace,
all. Default: all. Available only when Console log handler is activated.
--log-console-output <output>
Set the log output to JSON or default (plain) unstructured logging. Possible
values are: default, json. Default: default. Available only when Console log
@ -358,8 +358,8 @@ Logging:
level for logs shown in the output. It respects levels specified in the
'log-level' option, which represents the maximal verbosity for the whole
logging system. For more information, check the Logging guide. Possible
values are: off, fatal, error, warn, info, debug, trace, all. Default: all.
Available only when File log handler is activated.
values are (case insensitive): off, fatal, error, warn, info, debug, trace,
all. Default: all. Available only when File log handler is activated.
--log-file-output <output>
Set the log output to JSON or default (plain) unstructured logging. Possible
values are: default, json. Default: default. Available only when File log
@ -386,8 +386,8 @@ Logging:
level for logs shown in the output. It respects levels specified in the
'log-level' option, which represents the maximal verbosity for the whole
logging system. For more information, check the Logging guide. Possible
values are: off, fatal, error, warn, info, debug, trace, all. Default: all.
Available only when Syslog is activated.
values are (case insensitive): off, fatal, error, warn, info, debug, trace,
all. Default: all. Available only when Syslog is activated.
--log-syslog-max-length <max-length>
Set the maximum length, in bytes, of the message allowed to be sent. The
length includes the header and the message. If not set, the default value is
@ -497,4 +497,4 @@ Bootstrap Admin:
Do NOT start the server using this command when deploying to production.
Use 'kc.sh start-dev --help-all' to list all available options, including build
options.
options.

View File

@ -305,8 +305,8 @@ Logging:
level for logs shown in the output. It respects levels specified in the
'log-level' option, which represents the maximal verbosity for the whole
logging system. For more information, check the Logging guide. Possible
values are: off, fatal, error, warn, info, debug, trace, all. Default: all.
Available only when Console log handler is activated.
values are (case insensitive): off, fatal, error, warn, info, debug, trace,
all. Default: all. Available only when Console log handler is activated.
--log-console-output <output>
Set the log output to JSON or default (plain) unstructured logging. Possible
values are: default, json. Default: default. Available only when Console log
@ -360,4 +360,4 @@ By default, this command tries to update the server configuration by running a
$ kc.sh start '--optimized'
By doing that, the server should start faster based on any previous
configuration you have set when manually running the 'build' command.
configuration you have set when manually running the 'build' command.

View File

@ -338,8 +338,8 @@ Logging:
level for logs shown in the output. It respects levels specified in the
'log-level' option, which represents the maximal verbosity for the whole
logging system. For more information, check the Logging guide. Possible
values are: off, fatal, error, warn, info, debug, trace, all. Default: all.
Available only when Console log handler is activated.
values are (case insensitive): off, fatal, error, warn, info, debug, trace,
all. Default: all. Available only when Console log handler is activated.
--log-console-output <output>
Set the log output to JSON or default (plain) unstructured logging. Possible
values are: default, json. Default: default. Available only when Console log
@ -359,8 +359,8 @@ Logging:
level for logs shown in the output. It respects levels specified in the
'log-level' option, which represents the maximal verbosity for the whole
logging system. For more information, check the Logging guide. Possible
values are: off, fatal, error, warn, info, debug, trace, all. Default: all.
Available only when File log handler is activated.
values are (case insensitive): off, fatal, error, warn, info, debug, trace,
all. Default: all. Available only when File log handler is activated.
--log-file-output <output>
Set the log output to JSON or default (plain) unstructured logging. Possible
values are: default, json. Default: default. Available only when File log
@ -387,8 +387,8 @@ Logging:
level for logs shown in the output. It respects levels specified in the
'log-level' option, which represents the maximal verbosity for the whole
logging system. For more information, check the Logging guide. Possible
values are: off, fatal, error, warn, info, debug, trace, all. Default: all.
Available only when Syslog is activated.
values are (case insensitive): off, fatal, error, warn, info, debug, trace,
all. Default: all. Available only when Syslog is activated.
--log-syslog-max-length <max-length>
Set the maximum length, in bytes, of the message allowed to be sent. The
length includes the header and the message. If not set, the default value is
@ -502,4 +502,4 @@ By default, this command tries to update the server configuration by running a
$ kc.sh start '--optimized'
By doing that, the server should start faster based on any previous
configuration you have set when manually running the 'build' command.
configuration you have set when manually running the 'build' command.

View File

@ -256,8 +256,8 @@ Logging:
level for logs shown in the output. It respects levels specified in the
'log-level' option, which represents the maximal verbosity for the whole
logging system. For more information, check the Logging guide. Possible
values are: off, fatal, error, warn, info, debug, trace, all. Default: all.
Available only when Console log handler is activated.
values are (case insensitive): off, fatal, error, warn, info, debug, trace,
all. Default: all. Available only when Console log handler is activated.
--log-console-output <output>
Set the log output to JSON or default (plain) unstructured logging. Possible
values are: default, json. Default: default. Available only when Console log
@ -302,4 +302,4 @@ By default, this command tries to update the server configuration by running a
$ kc.sh start '--optimized'
By doing that, the server should start faster based on any previous
configuration you have set when manually running the 'build' command.
configuration you have set when manually running the 'build' command.

View File

@ -289,8 +289,8 @@ Logging:
level for logs shown in the output. It respects levels specified in the
'log-level' option, which represents the maximal verbosity for the whole
logging system. For more information, check the Logging guide. Possible
values are: off, fatal, error, warn, info, debug, trace, all. Default: all.
Available only when Console log handler is activated.
values are (case insensitive): off, fatal, error, warn, info, debug, trace,
all. Default: all. Available only when Console log handler is activated.
--log-console-output <output>
Set the log output to JSON or default (plain) unstructured logging. Possible
values are: default, json. Default: default. Available only when Console log
@ -310,8 +310,8 @@ Logging:
level for logs shown in the output. It respects levels specified in the
'log-level' option, which represents the maximal verbosity for the whole
logging system. For more information, check the Logging guide. Possible
values are: off, fatal, error, warn, info, debug, trace, all. Default: all.
Available only when File log handler is activated.
values are (case insensitive): off, fatal, error, warn, info, debug, trace,
all. Default: all. Available only when File log handler is activated.
--log-file-output <output>
Set the log output to JSON or default (plain) unstructured logging. Possible
values are: default, json. Default: default. Available only when File log
@ -338,8 +338,8 @@ Logging:
level for logs shown in the output. It respects levels specified in the
'log-level' option, which represents the maximal verbosity for the whole
logging system. For more information, check the Logging guide. Possible
values are: off, fatal, error, warn, info, debug, trace, all. Default: all.
Available only when Syslog is activated.
values are (case insensitive): off, fatal, error, warn, info, debug, trace,
all. Default: all. Available only when Syslog is activated.
--log-syslog-max-length <max-length>
Set the maximum length, in bytes, of the message allowed to be sent. The
length includes the header and the message. If not set, the default value is
@ -430,4 +430,4 @@ By default, this command tries to update the server configuration by running a
$ kc.sh start '--optimized'
By doing that, the server should start faster based on any previous
configuration you have set when manually running the 'build' command.
configuration you have set when manually running the 'build' command.