diff --git a/docs/documentation/release_notes/topics/26_0_0.adoc b/docs/documentation/release_notes/topics/26_0_0.adoc index f80ea52d8c..153aa67290 100644 --- a/docs/documentation/release_notes/topics/26_0_0.adoc +++ b/docs/documentation/release_notes/topics/26_0_0.adoc @@ -143,3 +143,9 @@ The deprecated `proxy` option was removed. This option was deprecated in {projec The `origin` property in the `UserRepresentation` is deprecated and planned to be removed in future releases. Instead, prefer using the `federationLink` property to obtain the provider to which a user is linked with. + += Removal of GELF logging handler + +GELF support has been deprecated for a while now, and with this release it has been finally removed from {project_name}. +Other log handlers are available and fully supported to be used as a replacement of GELF, for example Syslog. For details +see the https://www.keycloak.org/server/logging[Logging guide]. diff --git a/docs/documentation/upgrading/topics/changes/changes-26_0_0.adoc b/docs/documentation/upgrading/topics/changes/changes-26_0_0.adoc index 3334f13de9..11127e2597 100644 --- a/docs/documentation/upgrading/topics/changes/changes-26_0_0.adoc +++ b/docs/documentation/upgrading/topics/changes/changes-26_0_0.adoc @@ -168,6 +168,12 @@ on the console during migration. In this case, the statements must be run manual Also, the `kc.org` and `hideOnLoginPage` configuration attributes were migrated to the identity provider itself, to allow for more efficient queries when searching for providers. As such, API clients should use the `getOrganizationId/setOrganizationId` and `isHideOnLogin/setHideOnLogin` methods in the `IdentityProviderRepresentation`, and avoid setting these properties using the legacy config attributes that are now deprecated. += Removal of GELF logging handler + +GELF support has been deprecated for a while now, and with this release it has been finally removed from {project_name}. +Other log handlers are available and fully supported to be used as a replacement of GELF, for example Syslog. For details +see the https://www.keycloak.org/server/logging[Logging guide]. + = Paths for `common` theme resources have changed Some of the paths for the `common` resources of the `keycloak` theme have changed, specifically the resources for third-party libraries. Make sure to update your custom themes accordingly: diff --git a/docs/guides/server/logging.adoc b/docs/guides/server/logging.adoc index db877fbd63..63b5945f40 100644 --- a/docs/guides/server/logging.adoc +++ b/docs/guides/server/logging.adoc @@ -14,9 +14,6 @@ includedOptions="log log-*"> ** console (_default_) ** file ** Syslog -<@profile.ifCommunity> -** GELF - == Logging configuration Logging is done on a per-category basis in {project_name}. You can configure logging for the root log level or for more specific categories such as `org.hibernate` or `org.keycloak`. This {section} describes how to configure logging. @@ -75,7 +72,7 @@ To enable log handlers, enter the following command: The available handlers are <@profile.ifCommunity> -`console`, `file`, `syslog` and `gelf`. +`console`, `file`, `syslog`. <@profile.ifProduct> `console`, `file` and `syslog`. @@ -257,331 +254,4 @@ To use unstructured logging, enter the following command: As you can see, the timestamp is present twice, so you can amend it correspondingly via the `--log-syslog-format` property. -<@profile.ifCommunity> - -== Centralized logging using GELF -NOTE: The support for GELF log handler is deprecated and will be removed in a future {project_name} release. -The recommended alternative is using the Syslog log handler described above. - -{project_name} can send logs to a centralized log management system such as the following: - -* Graylog -* Logstash, inside the Elasticsearch, Logstash, Kibana (ELK) logging stack -* Fluentd, inside the Elasticsearch, Fluentd, Kibana (EFK) logging stack - -{project_name} uses the https://quarkus.io/guides/centralized-log-management[Quarkus Logging GELF] extension to support these environments. - -=== Enabling the GELF handler -To enable logging using GELF, add it to the list of activated log handlers. - -.Example: -<@kc.start parameters="--log=\"console,gelf\""/> - -=== Configuring the GELF handler - -To configure the Host and Port of your centralized logging system, enter the following command and substitute the values with your specific values: - -.Host and port of the GELF server: -<@kc.start parameters="--log=\"console,gelf\" --log-gelf-host=myhost --log-gelf-port=12345"/> - -When the GELF handler is enabled, the host is using `localhost` as host value and UDP for communication. To use TCP instead of UDP, prefix the host value with `tcp:`. The Default port is `12201`. - -.Include or exclude Stacktraces -{project_name} includes the complete Stacktrace inside the `StackTrace` field. To exclude this field, enter the following command: - -<@kc.start parameters="--log=\"console,gelf\" --log-gelf-include-stack-trace=false"/> - -.Configure the timestamp format -You can change the format of the `timestamp` field. For example, you can include the date and time down to seconds by entering the following command: - -<@kc.start parameters="--log=\"console,gelf\" --log-gelf-timestamp-format=\"\'yyyy-MM-dd HH:mm:ss\'\""/> - -Alternatively, you could use the config file to avoid escaping: - -[source, conf] ----- -log-gelf-timestamp-format=yyyy-MM-dd HH:mm:ss ----- - -The default timestamp format is `yyyy-MM-dd HH:mm:ss,SSS`. You can use the https://docs.oracle.com/javase/10/docs/api/java/text/SimpleDateFormat.html[available SimpleDateFormat patterns] to define an appropriate timestamp. - -.Configure the facility -The `facility` field is an indicator of the process or program that is the source of log messages. The default value is `keycloak`. To set this field to your preferred identifier, enter the following command: - -<@kc.start parameters="--log=\"console,gelf\" --log-gelf-facility=MyKeycloak"/> - -To use the CLI to configure {project_name} and use whitespaces for `facility`, enter the following command: - -<@kc.start parameters="--log=\"console,gelf\" --log-gelf-facility=\"\'my keycloak\'\""/> - -Alternatively, you could use the config file to avoid escaping: - -[source, conf] ----- -log-gelf-facility=my keycloak ----- - -.Configure the default message size -To change the default message size of 8kb (8192 bytes) of GELF log messages for {project_name}, enter the following command: - -<@kc.start parameters="--log=\"console,gelf\" --log-gelf-max-message-size=16384"/> - -The maximum size of one GELF log message is set in Bytes. The preceding example increases the size to 16kb. When messages exceed the maximum size, GELF submits the message in multiple chunks. - -.Configure sending of message parameters -{project_name} includes message parameters of the occurred log event. These fields appear in the output as `MessageParam0`, `MessageParam1`, and so on, depending on the parameter length. -To switch off this behavior, enter the following command: - -<@kc.start parameters="--log=\"console,gelf\" --log-gelf-include-message-parameters=false"/> - -.Configure sending of source code location -{project_name} includes the `SourceClassName`, `SourceMethodName` and `SourceSimpleClassName` fields in the GELF log messages. These fields provide detail on the location of an exception that occurred. To stop sending these fields, enter the following command: - -<@kc.start parameters="--log=\"console,gelf\" --log-gelf-include-location=false"/> - -=== Example: Send logs to Graylog -The following example shows how to send {project_name} logs to the Graylog centralized logging stack. This example assumes you have a container tool such as https://www.docker.com/[docker] installed to start the `compose.yml`. - -==== Starting the Graylog stack -The composed stack consists of: - -* Graylog -* ElasticSearch -* MongoDB - -[source, yaml] ----- -version: '3.8' - -services: - elasticsearch: - image: docker.io/elastic/elasticsearch:7.10.2 - ports: - - "9200:9200" - environment: - ES_JAVA_OPTS: "-Xms512m -Xmx512m" - discovery.type: "single-node" - networks: - - graylog - - mongo: - image: mongo:4.4 - networks: - - graylog - - graylog: - image: graylog/graylog:4.3.3 - ports: - - "9000:9000" - - "12201:12201/udp" - - "1514:1514" - environment: - GRAYLOG_HTTP_EXTERNAL_URI: "http://127.0.0.1:9000/" - # CHANGE ME (must be at least 16 characters)! - GRAYLOG_PASSWORD_SECRET: "forpasswordencryption" - # Password: admin - GRAYLOG_ROOT_PASSWORD_SHA2: "8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918" - networks: - - graylog - depends_on: - - elasticsearch - - mongo - -networks: - graylog: - driver: bridge ----- - -Copy and save the example locally into a `compose.yml` file and enter this command: - -[source,bash] ----- -docker compose up -d ----- -After a few seconds, the Stack is ready to serve requests. - -==== Creating a Graylog UDP Input -Once the stack is running, you need to create a UDP Input Graylog listens to. You can create it from the Graylog web UI (System → Input → Select GELF UDP) available at http://localhost:9000 or using the API: - -This `curl` example creates a new GELF UDP Input using the API and the default Graylog login credentials (admin/admin). - -[source, bash] ----- -curl -H "Content-Type: application/json" -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "X-Requested-By: curl" -X POST -v -d \ -'{"title":"udp input","configuration":{"recv_buffer_size":262144,"bind_address":"0.0.0.0","port":12201,"decompress_size_limit":8388608},"type":"org.graylog2.inputs.gelf.udp.GELFUDPInput","global":true}' \ -http://localhost:9000/api/system/inputs ----- - -If the stack is still in the bootstrap phase, you receive a response containing `* Empty reply from server`. A successful response includes `HTTP/1.1 201 Created` to indicate that the UDP input is created. - -==== Configure {project_name} to send logs using GELF -{project_name} needs to be configured to send logs using GELF. The appropriate configuration can be seen in the following keycloak.conf example. The example includes the `log-gelf-host` and `log-gelf-port` values. These are optional values that are included for illustration purposes; default values exist. - -.{project_name} GELF Configuration - -[source, conf] ----- -log=console,gelf -log-gelf-host=localhost -log-gelf-port=12201 ----- - -==== Graylog: See the results -. Open your web browser, go to `http://localhost:9000`. -. Log in to the Graylog web UI using the administrator credentials (admin/admin). -. Go to Streams, All Messages. -. Start updating the stream by pressing the Play button in the upper right corner. -. Start {project_name} using `start` or `start-dev` and your GELF config. - -After a few seconds, {project_name} messages appear in the Graylog dashboard. - -=== Example Setup using the ELK Stack -The following example shows how to send {project_name} logs to the ELK centralized logging stack. It assumes you have a container tool such as https://www.docker.com/[docker] installed to start the `compose.yml`. - -==== Enable the logstash GELF plugin and create a pipeline -Logstash uses an input plugin that understands and parses the GELF format. To activate this plugin when you are starting the ELK stack later on, create a directory `pipelines` and a file `gelf.conf` located in this directory. Then create an empty `compose.yml` in the parent directory. - -.File Structure: -[source] ----- -/ELK - - compose.yml - - pipelines/ - - gelf.conf ----- - - -Add the following contents to `pipelines/gelf.conf` and save it: - -[source, conf] ----- -input { - gelf { - port => 12201 - } -} -output { - stdout {} - elasticsearch { - hosts => ["http://elasticsearch:9200"] - } -} ----- - -This file activates and configures the logstash GELF plugin and points it to the right elasticsearch instance. - -==== Starting the ELK stack -The composed stack consists of: - -* ElasticSearch -* Logstash -* Kibana - -Copy the following content to your `compose.yml` file: - -[source, yaml] ----- -# Launch Elasticsearch -version: '3.8' - -services: - elasticsearch: - image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.8.2 - ports: - - "9200:9200" - - "9300:9300" - environment: - ES_JAVA_OPTS: "-Xms512m -Xmx512m" - networks: - - elk - - logstash: - image: docker.elastic.co/logstash/logstash-oss:6.8.2 - volumes: - - source: ./pipelines #the source dir gelf.conf resides - target: /usr/share/logstash/pipeline - type: bind - ports: - - "12201:12201/udp" - - "5000:5000" - - "9600:9600" - networks: - - elk - depends_on: - - elasticsearch - - kibana: - image: docker.elastic.co/kibana/kibana-oss:6.8.2 - ports: - - "5601:5601" - networks: - - elk - depends_on: - - elasticsearch - -networks: - elk: - driver: bridge ----- -Start the stack by entering the following command: - -[source, bash] ----- -docker compose up -d ----- -After a few seconds the Stack should be ready to serve requests. - -==== Configuring {project_name} to send logs using GELF -{project_name} needs to be configured to send logs using GELF. The appropriate configuration can be seen in the following keycloak.conf example. This example includes the `log-gelf-host` and `log-gelf-port` values. These are optional values, which are included for illustration purposes; default values exist. - -.{project_name} Gelf Configuration - -[source, conf] ----- -log=console,gelf -log-gelf-host=localhost -log-gelf-port=12201 ----- - -With this configuration applied, start {project_name} using `start-dev` or `start`. - -==== Kibana: See the results -Open http://localhost:5601 to reach the Kibana dashboard. The exact configuration of a good monitoring dashboard is out of scope for this {section}. To find out if logs sent by {project_name} are delivered to Kibana, open the http://localhost:5601/app/kibana#/dev_tools/console?_g=()[Dev Tools] and execute the default `match_all` query. The logs should appear in the result field. - -=== Configure a different log level for the GELF logger -To keep log storage costs and verbosity low, it is often wanted to only store a subset of the verbose application logs inside a centralized log management system. To configure {project_name} to use a different log level for the logs you want to ingest, use the following configuration: - -[source, conf] ----- -log=console,gelf -log-gelf-level= -... ----- - -.Example -To only see occurred log levels of warn and above in your centralized logging stack, but still see INFO level logs on the applications console logs, use the following configuration: - -[source, conf] ----- -log=console,gelf -log-level=INFO -log-gelf-level=warn -... ----- - -Looking at your ingested logs, you will see only messages of level warn or above will appear. - -Keep in mind that `--log-level` is setting the leading log level, so for example when you invoke the following command: - -<@kc.start parameters="--log=\"console,gelf\" --log-level=error --log-gelf-level=info"/> - -nothing below the error level will be sent to your logging stack. That means that even GELF in this example will receive only error level log messages. - -=== Configure additional key values -Currently, the {project_name} configuration does not support partly dynamic configuration keys, as they are used in quarkus properties. For example, they are used when defining `quarkus.log.handler.gelf.additional-field..value`. - -To add user-defined fields, you can provide these fields through a quarkus.properties file. See <@links.server id="configuration"/> and the _Using raw Quarkus properties_ section. - - - diff --git a/quarkus/config-api/src/main/java/org/keycloak/config/LoggingOptions.java b/quarkus/config-api/src/main/java/org/keycloak/config/LoggingOptions.java index 85bd81e45c..7e37a3a76e 100644 --- a/quarkus/config-api/src/main/java/org/keycloak/config/LoggingOptions.java +++ b/quarkus/config-api/src/main/java/org/keycloak/config/LoggingOptions.java @@ -18,7 +18,6 @@ public class LoggingOptions { public static final Output DEFAULT_SYSLOG_OUTPUT = Output.DEFAULT; public static final String DEFAULT_LOG_FILENAME = "keycloak.log"; public static final String DEFAULT_LOG_PATH = "data" + File.separator + "log" + File.separator + DEFAULT_LOG_FILENAME; - public static final Boolean GELF_ACTIVATED = isGelfActivated(); // Log format + tracing private static final Function DEFAULT_LOG_FORMAT_FUNC = (additionalFields) -> @@ -29,34 +28,14 @@ public class LoggingOptions { public enum Handler { console, file, - syslog, - gelf + syslog } - public static List getAvailableHandlerNames() { - final Predicate checkGelf = (handler) -> GELF_ACTIVATED || !handler.equals(Handler.gelf); - - return Arrays.stream(Handler.values()) - .filter(checkGelf) - .map(Handler::name) - .toList(); - } - - private static Option> createLogOption() { - OptionBuilder> logOptionBuilder = OptionBuilder.listOptionBuilder("log", Handler.class) - .category(OptionCategory.LOGGING) - .description("Enable one or more log handlers in a comma-separated list.") - .expectedValues(getAvailableHandlerNames()) - .defaultValue(Arrays.asList(DEFAULT_LOG_HANDLER)); - - if (GELF_ACTIVATED) { - logOptionBuilder.deprecatedValues(Set.of("gelf"), "GELF log handler has been deprecated."); - } - - return logOptionBuilder.build(); - } - - public static final Option> LOG = createLogOption(); + public static final Option> LOG = OptionBuilder.listOptionBuilder("log", Handler.class) + .category(OptionCategory.LOGGING) + .description("Enable one or more log handlers in a comma-separated list.") + .defaultValue(List.of(DEFAULT_LOG_HANDLER)) + .build(); public enum Level { OFF, @@ -194,89 +173,4 @@ public class LoggingOptions { .description("Set the syslog output to JSON or default (plain) unstructured logging.") .build(); - // GELF - public static final Option LOG_GELF_ENABLED = new OptionBuilder<>("log-gelf-enabled", Boolean.class) - .category(OptionCategory.LOGGING) - .hidden() - .build(); - - public static final Option LOG_GELF_LEVEL = new OptionBuilder<>("log-gelf-level", String.class) - .category(OptionCategory.LOGGING) - .defaultValue("INFO") - .description("The log level specifying which message levels will be logged by the GELF logger. Message levels lower than this value will be discarded.") - .deprecated() - .build(); - - public static final Option LOG_GELF_HOST = new OptionBuilder<>("log-gelf-host", String.class) - .category(OptionCategory.LOGGING) - .description("Hostname of the Logstash or Graylog Host. By default UDP is used, prefix the host with 'tcp:' to switch to TCP. Example: 'tcp:localhost'") - .defaultValue("localhost") - .deprecated() - .build(); - - public static final Option LOG_GELF_PORT = new OptionBuilder<>("log-gelf-port", Integer.class) - .category(OptionCategory.LOGGING) - .description("The port the Logstash or Graylog Host is called on.") - .deprecated() - .defaultValue(12201) - .build(); - - public static final Option LOG_GELF_VERSION = new OptionBuilder<>("log-gelf-version", String.class) - .category(OptionCategory.LOGGING) - .description("The GELF version to be used.") - .defaultValue("1.1") - .hidden() - .expectedValues("1.0", "1.1") - .build(); - - public static final Option LOG_GELF_INCLUDE_STACK_TRACE = new OptionBuilder<>("log-gelf-include-stack-trace", Boolean.class) - .category(OptionCategory.LOGGING) - .description("If set to true, occurring stack traces are included in the 'StackTrace' field in the GELF output.") - .defaultValue(Boolean.TRUE) - .deprecated() - .build(); - - public static final Option LOG_GELF_TIMESTAMP_FORMAT = new OptionBuilder<>("log-gelf-timestamp-format", String.class) - .category(OptionCategory.LOGGING) - .description("Set the format for the GELF timestamp field. Uses Java SimpleDateFormat pattern.") - .defaultValue("yyyy-MM-dd HH:mm:ss,SSS") - .deprecated() - .build(); - - public static final Option LOG_GELF_FACILITY = new OptionBuilder<>("log-gelf-facility", String.class) - .category(OptionCategory.LOGGING) - .description("The facility (name of the process) that sends the message.") - .defaultValue("keycloak") - .deprecated() - .build(); - - public static final Option LOG_GELF_MAX_MSG_SIZE = new OptionBuilder<>("log-gelf-max-message-size", Integer.class) - .category(OptionCategory.LOGGING) - .description("Maximum message size (in bytes). If the message size is exceeded, GELF will submit the message in multiple chunks.") - .defaultValue(8192) - .deprecated() - .build(); - - public static final Option LOG_GELF_INCLUDE_LOG_MSG_PARAMS = new OptionBuilder<>("log-gelf-include-message-parameters", Boolean.class) - .category(OptionCategory.LOGGING) - .description("Include message parameters from the log event.") - .defaultValue(Boolean.TRUE) - .deprecated() - .build(); - - public static final Option LOG_GELF_INCLUDE_LOCATION = new OptionBuilder<>("log-gelf-include-location", Boolean.class) - .category(OptionCategory.LOGGING) - .description("Include source code location.") - .defaultValue(Boolean.TRUE) - .deprecated() - .build(); - - private static boolean isGelfActivated() { - try { - Thread.currentThread().getContextClassLoader().loadClass("io.quarkus.logging.gelf.GelfConfig"); - return true; - } catch (ClassNotFoundException e) { - return false; - } - } } diff --git a/quarkus/deployment/pom.xml b/quarkus/deployment/pom.xml index c9600420ad..f8a51ed89a 100644 --- a/quarkus/deployment/pom.xml +++ b/quarkus/deployment/pom.xml @@ -208,21 +208,4 @@ - - - includeGelf - - - !product - - - - - io.quarkus - quarkus-logging-gelf-deployment - - - - - diff --git a/quarkus/runtime/pom.xml b/quarkus/runtime/pom.xml index a942473511..328f5dfab0 100644 --- a/quarkus/runtime/pom.xml +++ b/quarkus/runtime/pom.xml @@ -706,19 +706,5 @@ - - includeGelf - - - !product - - - - - io.quarkus - quarkus-logging-gelf - - - diff --git a/quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/configuration/mappers/LoggingPropertyMappers.java b/quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/configuration/mappers/LoggingPropertyMappers.java index 4b64d1b6f1..9c59f15558 100644 --- a/quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/configuration/mappers/LoggingPropertyMappers.java +++ b/quarkus/runtime/src/main/java/org/keycloak/quarkus/runtime/configuration/mappers/LoggingPropertyMappers.java @@ -2,7 +2,6 @@ package org.keycloak.quarkus.runtime.configuration.mappers; import static java.util.Optional.of; import static org.keycloak.config.LoggingOptions.DEFAULT_LOG_FORMAT; -import static org.keycloak.config.LoggingOptions.GELF_ACTIVATED; import static org.keycloak.quarkus.runtime.configuration.Configuration.isTrue; import static org.keycloak.quarkus.runtime.configuration.mappers.PropertyMapper.fromOption; @@ -13,7 +12,6 @@ import java.util.function.BiFunction; import java.util.logging.Level; import java.util.stream.Stream; -import org.apache.commons.lang3.ArrayUtils; import org.jboss.logmanager.LogContext; import org.keycloak.config.LoggingOptions; import org.keycloak.config.Option; @@ -29,7 +27,6 @@ public final class LoggingPropertyMappers { private static final String CONSOLE_ENABLED_MSG = "Console log handler is activated"; private static final String FILE_ENABLED_MSG = "File log handler is activated"; private static final String SYSLOG_ENABLED_MSG = "Syslog is activated"; - private static final String GELF_ENABLED_MSG = "GELF is activated"; private LoggingPropertyMappers() { } @@ -140,68 +137,7 @@ public final class LoggingPropertyMappers { .build(), }; - return GELF_ACTIVATED ? ArrayUtils.addAll(defaultMappers, getGelfMappers()) : defaultMappers; - } - - public static PropertyMapper[] getGelfMappers() { - return new PropertyMapper[]{ - fromOption(LoggingOptions.LOG_GELF_ENABLED) - .mapFrom("log") - .to("quarkus.log.handler.gelf.enabled") - .transformer(LoggingPropertyMappers.resolveLogHandler("gelf")) - .build(), - fromOption(LoggingOptions.LOG_GELF_LEVEL) - .isEnabled(LoggingPropertyMappers::isGelfEnabled, GELF_ENABLED_MSG) - .to("quarkus.log.handler.gelf.level") - .paramLabel("level") - .build(), - fromOption(LoggingOptions.LOG_GELF_HOST) - .isEnabled(LoggingPropertyMappers::isGelfEnabled, GELF_ENABLED_MSG) - .to("quarkus.log.handler.gelf.host") - .paramLabel("hostname") - .build(), - fromOption(LoggingOptions.LOG_GELF_PORT) - .isEnabled(LoggingPropertyMappers::isGelfEnabled, GELF_ENABLED_MSG) - .to("quarkus.log.handler.gelf.port") - .paramLabel("port") - .build(), - fromOption(LoggingOptions.LOG_GELF_VERSION) - .isEnabled(LoggingPropertyMappers::isGelfEnabled, GELF_ENABLED_MSG) - .to("quarkus.log.handler.gelf.version") - .paramLabel("version") - .build(), - fromOption(LoggingOptions.LOG_GELF_INCLUDE_STACK_TRACE) - .isEnabled(LoggingPropertyMappers::isGelfEnabled, GELF_ENABLED_MSG) - .to("quarkus.log.handler.gelf.extract-stack-trace") - .build(), - fromOption(LoggingOptions.LOG_GELF_TIMESTAMP_FORMAT) - .isEnabled(LoggingPropertyMappers::isGelfEnabled, GELF_ENABLED_MSG) - .to("quarkus.log.handler.gelf.timestamp-pattern") - .paramLabel("pattern") - .build(), - fromOption(LoggingOptions.LOG_GELF_FACILITY) - .isEnabled(LoggingPropertyMappers::isGelfEnabled, GELF_ENABLED_MSG) - .to("quarkus.log.handler.gelf.facility") - .paramLabel("name") - .build(), - fromOption(LoggingOptions.LOG_GELF_MAX_MSG_SIZE) - .isEnabled(LoggingPropertyMappers::isGelfEnabled, GELF_ENABLED_MSG) - .to("quarkus.log.handler.gelf.maximum-message-size") - .paramLabel("size") - .build(), - fromOption(LoggingOptions.LOG_GELF_INCLUDE_LOG_MSG_PARAMS) - .isEnabled(LoggingPropertyMappers::isGelfEnabled, GELF_ENABLED_MSG) - .to("quarkus.log.handler.gelf.include-log-message-parameters") - .build(), - fromOption(LoggingOptions.LOG_GELF_INCLUDE_LOCATION) - .isEnabled(LoggingPropertyMappers::isGelfEnabled, GELF_ENABLED_MSG) - .to("quarkus.log.handler.gelf.include-location") - .build() - }; - } - - public static boolean isGelfEnabled() { - return isTrue(LoggingOptions.LOG_GELF_ENABLED); + return defaultMappers; } public static boolean isConsoleEnabled() { diff --git a/quarkus/runtime/src/test/java/org/keycloak/quarkus/runtime/configuration/test/ConfigurationTest.java b/quarkus/runtime/src/test/java/org/keycloak/quarkus/runtime/configuration/test/ConfigurationTest.java index 2c9eadf0ee..fbcdc4d945 100644 --- a/quarkus/runtime/src/test/java/org/keycloak/quarkus/runtime/configuration/test/ConfigurationTest.java +++ b/quarkus/runtime/src/test/java/org/keycloak/quarkus/runtime/configuration/test/ConfigurationTest.java @@ -437,42 +437,30 @@ public class ConfigurationTest extends AbstractConfigurationTest { assertEquals("true", config.getConfigValue("quarkus.log.console.enable").getValue()); assertEquals("true", config.getConfigValue("quarkus.log.file.enable").getValue()); assertEquals("false", config.getConfigValue("quarkus.log.syslog.enable").getValue()); - assertEquals("false", config.getConfigValue("quarkus.log.handler.gelf.enabled").getValue()); ConfigArgsConfigSource.setCliArgs("--log=file"); SmallRyeConfig config2 = createConfig(); assertEquals("false", config2.getConfigValue("quarkus.log.console.enable").getValue()); assertEquals("true", config2.getConfigValue("quarkus.log.file.enable").getValue()); assertEquals("false", config2.getConfigValue("quarkus.log.syslog.enable").getValue()); - assertEquals("false", config2.getConfigValue("quarkus.log.handler.gelf.enabled").getValue()); ConfigArgsConfigSource.setCliArgs("--log=console"); SmallRyeConfig config3 = createConfig(); assertEquals("true", config3.getConfigValue("quarkus.log.console.enable").getValue()); assertEquals("false", config3.getConfigValue("quarkus.log.file.enable").getValue()); assertEquals("false", config3.getConfigValue("quarkus.log.syslog.enable").getValue()); - assertEquals("false", config3.getConfigValue("quarkus.log.handler.gelf.enabled").getValue()); - - ConfigArgsConfigSource.setCliArgs("--log=console,gelf"); - SmallRyeConfig config4 = createConfig(); - assertEquals("true", config4.getConfigValue("quarkus.log.console.enable").getValue()); - assertEquals("false", config4.getConfigValue("quarkus.log.file.enable").getValue()); - assertEquals("false", config4.getConfigValue("quarkus.log.syslog.enable").getValue()); - assertEquals("true", config4.getConfigValue("quarkus.log.handler.gelf.enabled").getValue()); ConfigArgsConfigSource.setCliArgs("--log=console,syslog"); SmallRyeConfig config5 = createConfig(); assertEquals("true", config5.getConfigValue("quarkus.log.console.enable").getValue()); assertEquals("false", config5.getConfigValue("quarkus.log.file.enable").getValue()); assertEquals("true", config5.getConfigValue("quarkus.log.syslog.enable").getValue()); - assertEquals("false", config5.getConfigValue("quarkus.log.handler.gelf.enabled").getValue()); ConfigArgsConfigSource.setCliArgs("--log=syslog"); SmallRyeConfig config6 = createConfig(); assertEquals("false", config6.getConfigValue("quarkus.log.console.enable").getValue()); assertEquals("false", config6.getConfigValue("quarkus.log.file.enable").getValue()); assertEquals("true", config6.getConfigValue("quarkus.log.syslog.enable").getValue()); - assertEquals("false", config6.getConfigValue("quarkus.log.handler.gelf.enabled").getValue()); } @Test diff --git a/quarkus/runtime/src/test/resources/META-INF/keycloak.conf b/quarkus/runtime/src/test/resources/META-INF/keycloak.conf index d1a3f2cba4..2ffe93db01 100644 --- a/quarkus/runtime/src/test/resources/META-INF/keycloak.conf +++ b/quarkus/runtime/src/test/resources/META-INF/keycloak.conf @@ -4,6 +4,4 @@ log-level=${SOME_LOG_LEVEL:warn} config-keystore=src/test/resources/keystore config-keystore-password=secret -quarkus.log.file.path=random/path - -log-gelf-level=WARN \ No newline at end of file +quarkus.log.file.path=random/path \ No newline at end of file diff --git a/quarkus/tests/integration/pom.xml b/quarkus/tests/integration/pom.xml index df7b4c9bc7..a872993a63 100644 --- a/quarkus/tests/integration/pom.xml +++ b/quarkus/tests/integration/pom.xml @@ -184,26 +184,6 @@ - - includeGelf - - - !product - - - - - - maven-surefire-plugin - - - true - - - - - - diff --git a/quarkus/tests/integration/src/test/java/org/keycloak/it/cli/dist/GelfRemovedTest.java b/quarkus/tests/integration/src/test/java/org/keycloak/it/cli/dist/GelfRemovedTest.java deleted file mode 100644 index ec6d8c9bae..0000000000 --- a/quarkus/tests/integration/src/test/java/org/keycloak/it/cli/dist/GelfRemovedTest.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2023 Red Hat, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.keycloak.it.cli.dist; - -import io.quarkus.test.junit.main.Launch; -import io.quarkus.test.junit.main.LaunchResult; -import org.junit.jupiter.api.Test; -import org.keycloak.it.junit5.extension.CLIResult; -import org.keycloak.it.junit5.extension.DistributionTest; -import org.keycloak.it.junit5.extension.RawDistOnly; -import org.keycloak.quarkus.runtime.cli.command.StartDev; - -@DistributionTest -@RawDistOnly(reason = "Verifying the help message output doesn't need long spin-up of docker dist tests.") -public class GelfRemovedTest { - - public static final String INCLUDE_GELF_PROPERTY = "includeGelf"; - - @Test - @Launch({StartDev.NAME, "--help-all"}) - void checkGelfRemoved(LaunchResult result) { - CLIResult cliResult = (CLIResult) result; - if (Boolean.getBoolean(INCLUDE_GELF_PROPERTY)) { - cliResult.assertMessage("gelf"); - } else { - cliResult.assertNoMessage("gelf"); - } - } -} diff --git a/quarkus/tests/integration/src/test/java/org/keycloak/it/cli/dist/HelpCommandDistTest.java b/quarkus/tests/integration/src/test/java/org/keycloak/it/cli/dist/HelpCommandDistTest.java index 649f09b122..80b01ed23d 100644 --- a/quarkus/tests/integration/src/test/java/org/keycloak/it/cli/dist/HelpCommandDistTest.java +++ b/quarkus/tests/integration/src/test/java/org/keycloak/it/cli/dist/HelpCommandDistTest.java @@ -18,7 +18,6 @@ package org.keycloak.it.cli.dist; import static org.junit.Assert.assertEquals; -import static org.keycloak.it.cli.dist.GelfRemovedTest.INCLUDE_GELF_PROPERTY; import static org.keycloak.quarkus.runtime.cli.command.AbstractStartCommand.OPTIMIZED_BUILD_OPTION_LONG; import java.io.IOException; @@ -31,8 +30,6 @@ import org.apache.commons.io.FileUtils; import org.approvaltests.Approvals; import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; -import org.junit.jupiter.api.Assumptions; -import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.condition.OS; import org.keycloak.it.junit5.extension.CLIResult; @@ -54,11 +51,6 @@ public class HelpCommandDistTest { public static final String REPLACE_EXPECTED = "KEYCLOAK_REPLACE_EXPECTED"; - @BeforeAll - public static void assumeGelfEnabled() { - Assumptions.assumeTrue(Boolean.getBoolean(INCLUDE_GELF_PROPERTY), "Assume GELF support is given in order to simplify these test cases"); - } - @Test @Launch({}) void testDefaultToHelp(LaunchResult result) { diff --git a/quarkus/tests/integration/src/test/java/org/keycloak/it/cli/dist/LoggingDistTest.java b/quarkus/tests/integration/src/test/java/org/keycloak/it/cli/dist/LoggingDistTest.java index d300669035..3fd3caf6fe 100644 --- a/quarkus/tests/integration/src/test/java/org/keycloak/it/cli/dist/LoggingDistTest.java +++ b/quarkus/tests/integration/src/test/java/org/keycloak/it/cli/dist/LoggingDistTest.java @@ -137,14 +137,14 @@ public class LoggingDistTest { void failUnknownHandlersInConfFile(KeycloakDistribution dist) { dist.copyOrReplaceFileFromClasspath("/logging/keycloak.conf", Paths.get("conf", "keycloak.conf")); CLIResult cliResult = dist.run("start-dev"); - cliResult.assertError("Invalid value for option 'kc.log' in keycloak.conf: foo. Expected values are: console, file, syslog, gelf"); + cliResult.assertError("Invalid value for option 'kc.log' in keycloak.conf: foo. Expected values are: console, file, syslog"); } @Test void failEmptyLogErrorFromConfFileError(KeycloakDistribution dist) { dist.copyOrReplaceFileFromClasspath("/logging/emptylog.conf", Paths.get("conf", "emptylog.conf")); CLIResult cliResult = dist.run(CONFIG_FILE_LONG_NAME+"=../conf/emptylog.conf", "start-dev"); - cliResult.assertError("Invalid value for option 'kc.log' in emptylog.conf: . Expected values are: console, file, syslog, gelf"); + cliResult.assertError("Invalid value for option 'kc.log' in emptylog.conf: . Expected values are: console, file, syslog"); } @Test @@ -169,4 +169,4 @@ public class LoggingDistTest { cliResult.assertNoMessage("Listening on:"); cliResult.assertError("Error writing to TCP stream"); } -} \ No newline at end of file +} diff --git a/quarkus/tests/integration/src/test/java/org/keycloak/it/cli/dist/OptionsDistTest.java b/quarkus/tests/integration/src/test/java/org/keycloak/it/cli/dist/OptionsDistTest.java index 29eff37408..683ef48a1c 100644 --- a/quarkus/tests/integration/src/test/java/org/keycloak/it/cli/dist/OptionsDistTest.java +++ b/quarkus/tests/integration/src/test/java/org/keycloak/it/cli/dist/OptionsDistTest.java @@ -70,14 +70,13 @@ public class OptionsDistTest { @Test @Order(5) - @WithEnvVars({"KC_LOG", "console", "KC_LOG_CONSOLE_COLOR", "true", "KC_LOG_FILE", "something-env", "KC_LOG_GELF_VERSION", "1.1", "KC_HTTP_ENABLED", "true", "KC_HOSTNAME_STRICT", "false"}) + @WithEnvVars({"KC_LOG", "console", "KC_LOG_CONSOLE_COLOR", "true", "KC_LOG_FILE", "something-env", "KC_HTTP_ENABLED", "true", "KC_HOSTNAME_STRICT", "false"}) @Launch({"start"}) public void testSettingEnvVars(LaunchResult result) { CLIResult cliResult = (CLIResult) result; cliResult.assertMessage("The following used run time options are UNAVAILABLE and will be ignored during build time:"); cliResult.assertMessage("- log-file: Available only when File log handler is activated."); - cliResult.assertMessage("- log-gelf-version: Available only when GELF is activated."); cliResult.assertMessage("quarkus.log.console.color"); cliResult.assertMessage("config property is deprecated and should not be used anymore"); } @@ -93,32 +92,21 @@ public class OptionsDistTest { // specified in the OptionsDistTest/keycloak.conf result.assertMessage("The following used run time options are UNAVAILABLE and will be ignored during build time:"); - result.assertMessage("- log-gelf-level: Available only when GELF is activated."); - result.assertMessage("- log-gelf-version: Available only when GELF is activated."); - } - - @Test - @Order(7) - @Launch({"start-dev", "--log=console", "--log-gelf-include-stack-trace=true"}) - public void testDisabledGelfOption(LaunchResult result) { - CLIResult cliResult = (CLIResult) result; - cliResult.assertError("Disabled option: '--log-gelf-include-stack-trace'. Available only when GELF is activated"); - cliResult.assertError("Possible solutions: --log, --log-console-output, --log-console-format, --log-console-color, --log-level"); - cliResult.assertError("Try '" + KeycloakDistribution.SCRIPT_CMD + " start-dev --help' for more information on the available options."); - cliResult.assertError("Specify '--help-all' to obtain information on all options and their availability."); + result.assertMessage("- log-syslog-protocol: Available only when Syslog is activated."); + result.assertMessage("- log-syslog-app-name: Available only when Syslog is activated."); } // Start-dev should be executed as last tests - build is done for development mode @Test - @Order(8) + @Order(7) @Launch({"start-dev", "--test=invalid"}) public void testServerDoesNotStartIfValidationFailDuringReAugStartDev(LaunchResult result) { assertEquals(1, result.getErrorStream().stream().filter(s -> s.contains("Unknown option: '--test'")).count()); } @Test - @Order(9) + @Order(8) @Launch({"start-dev", "--log=console", "--log-file-output=json"}) public void testServerDoesNotStartDevIfDisabledFileLogOption(LaunchResult result) { assertEquals(1, result.getErrorStream().stream().filter(s -> s.contains("Disabled option: '--log-file-output'. Available only when File log handler is activated")).count()); @@ -126,7 +114,7 @@ public class OptionsDistTest { } @Test - @Order(10) + @Order(9) @Launch({"start-dev", "--log=file", "--log-file-output=json", "--log-console-color=true"}) public void testServerStartDevIfEnabledFileLogOption(LaunchResult result) { assertEquals(0, result.getErrorStream().stream().filter(s -> s.contains("Disabled option: '--log-file-output'. Available only when File log handler is activated")).count()); diff --git a/quarkus/tests/integration/src/test/java/org/keycloak/it/cli/dist/StartCommandDistTest.java b/quarkus/tests/integration/src/test/java/org/keycloak/it/cli/dist/StartCommandDistTest.java index d7496e1d21..c0d262053c 100644 --- a/quarkus/tests/integration/src/test/java/org/keycloak/it/cli/dist/StartCommandDistTest.java +++ b/quarkus/tests/integration/src/test/java/org/keycloak/it/cli/dist/StartCommandDistTest.java @@ -51,14 +51,14 @@ public class StartCommandDistTest { assertTrue(result.getErrorOutput().contains("spi argument --spi-events-listener-jboss-logging-success-level requires a value"), () -> "The Output:\n" + result.getErrorOutput() + "doesn't contains the expected string."); } - + @Test @Launch({ "build", "--spi-events-listener-jboss-logging-success-level=debug" }) void warnSpiRuntimeAtBuildtime(LaunchResult result) { assertTrue(result.getOutput().contains("The following run time options were found, but will be ignored during build time: kc.spi-events-listener-jboss-logging-success-level"), () -> "The Output:\n" + result.getOutput() + "doesn't contains the expected string."); } - + @Test @Launch({ "start", "--optimized", "--http-enabled=true", "--hostname-strict=false", "--spi-events-listener-jboss-logging-enabled=false" }) void warnSpiBuildtimeAtRuntime(LaunchResult result) { @@ -135,7 +135,7 @@ public class StartCommandDistTest { @Launch({ "start", "--optimized" }) void testStartUsingOptimizedInvalidEnvOption(LaunchResult result) { CLIResult cliResult = (CLIResult) result; - cliResult.assertError("Invalid value for option 'KC_LOG': invalid. Expected values are: console, file, syslog, gelf"); + cliResult.assertError("Invalid value for option 'KC_LOG': invalid. Expected values are: console, file, syslog"); } @Test diff --git a/quarkus/tests/integration/src/test/resources/OptionsDistTest/keycloak.conf b/quarkus/tests/integration/src/test/resources/OptionsDistTest/keycloak.conf index 5912cc02ae..2de67c9daf 100644 --- a/quarkus/tests/integration/src/test/resources/OptionsDistTest/keycloak.conf +++ b/quarkus/tests/integration/src/test/resources/OptionsDistTest/keycloak.conf @@ -4,5 +4,5 @@ log=console,file log-file-output=json # Ignored disabled -log-gelf-level=WARN -log-gelf-version=1.1 +log-syslog-protocol=udp +log-syslog-app-name=my-kc diff --git a/quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testExportHelp.approved.txt b/quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testExportHelp.approved.txt index 78a3894f59..68fd75a48d 100644 --- a/quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testExportHelp.approved.txt +++ b/quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testExportHelp.approved.txt @@ -119,7 +119,7 @@ Vault: Logging: --log Enable one or more log handlers in a comma-separated list. Possible values - are: console, file, syslog, gelf (deprecated). Default: console. + are: console, file, syslog. Default: console. --log-console-color Enable or disable colors when logging to console. Default: false. Available only when Console log handler is activated. diff --git a/quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testExportHelpAll.approved.txt b/quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testExportHelpAll.approved.txt index 0690a068b2..e13bcd1da4 100644 --- a/quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testExportHelpAll.approved.txt +++ b/quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testExportHelpAll.approved.txt @@ -119,7 +119,7 @@ Vault: Logging: --log Enable one or more log handlers in a comma-separated list. Possible values - are: console, file, syslog, gelf (deprecated). Default: console. + are: console, file, syslog. Default: console. --log-console-color Enable or disable colors when logging to console. Default: false. Available only when Console log handler is activated. @@ -149,38 +149,6 @@ Logging: Set the log output to JSON or default (plain) unstructured logging. Possible values are: default, json. Default: default. Available only when File log handler is activated. ---log-gelf-facility - DEPRECATED. The facility (name of the process) that sends the message. - Default: keycloak. Available only when GELF is activated. ---log-gelf-host - DEPRECATED. Hostname of the Logstash or Graylog Host. By default UDP is used, - prefix the host with 'tcp:' to switch to TCP. Example: 'tcp:localhost' - Default: localhost. Available only when GELF is activated. ---log-gelf-include-location - DEPRECATED. Include source code location. Default: true. Available only when - GELF is activated. ---log-gelf-include-message-parameters - DEPRECATED. Include message parameters from the log event. Default: true. - Available only when GELF is activated. ---log-gelf-include-stack-trace - DEPRECATED. If set to true, occurring stack traces are included in the - 'StackTrace' field in the GELF output. Default: true. Available only when - GELF is activated. ---log-gelf-level - DEPRECATED. The log level specifying which message levels will be logged by - the GELF logger. Message levels lower than this value will be discarded. - Default: INFO. Available only when GELF is activated. ---log-gelf-max-message-size - DEPRECATED. Maximum message size (in bytes). If the message size is exceeded, - GELF will submit the message in multiple chunks. Default: 8192. Available - only when GELF is activated. ---log-gelf-port - DEPRECATED. The port the Logstash or Graylog Host is called on. Default: - 12201. Available only when GELF is activated. ---log-gelf-timestamp-format - DEPRECATED. Set the format for the GELF timestamp field. Uses Java - SimpleDateFormat pattern. Default: yyyy-MM-dd HH:mm:ss,SSS. Available only - when GELF is activated. --log-level The log level of the root category or a comma-separated list of individual categories and their levels. For the root category, you don't need to diff --git a/quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testImportHelp.approved.txt b/quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testImportHelp.approved.txt index 65fd8f01de..96f8b8e6ff 100644 --- a/quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testImportHelp.approved.txt +++ b/quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testImportHelp.approved.txt @@ -119,7 +119,7 @@ Vault: Logging: --log Enable one or more log handlers in a comma-separated list. Possible values - are: console, file, syslog, gelf (deprecated). Default: console. + are: console, file, syslog. Default: console. --log-console-color Enable or disable colors when logging to console. Default: false. Available only when Console log handler is activated. diff --git a/quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testImportHelpAll.approved.txt b/quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testImportHelpAll.approved.txt index 8db463427c..2ef0c9fc3a 100644 --- a/quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testImportHelpAll.approved.txt +++ b/quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testImportHelpAll.approved.txt @@ -119,7 +119,7 @@ Vault: Logging: --log Enable one or more log handlers in a comma-separated list. Possible values - are: console, file, syslog, gelf (deprecated). Default: console. + are: console, file, syslog. Default: console. --log-console-color Enable or disable colors when logging to console. Default: false. Available only when Console log handler is activated. @@ -149,38 +149,6 @@ Logging: Set the log output to JSON or default (plain) unstructured logging. Possible values are: default, json. Default: default. Available only when File log handler is activated. ---log-gelf-facility - DEPRECATED. The facility (name of the process) that sends the message. - Default: keycloak. Available only when GELF is activated. ---log-gelf-host - DEPRECATED. Hostname of the Logstash or Graylog Host. By default UDP is used, - prefix the host with 'tcp:' to switch to TCP. Example: 'tcp:localhost' - Default: localhost. Available only when GELF is activated. ---log-gelf-include-location - DEPRECATED. Include source code location. Default: true. Available only when - GELF is activated. ---log-gelf-include-message-parameters - DEPRECATED. Include message parameters from the log event. Default: true. - Available only when GELF is activated. ---log-gelf-include-stack-trace - DEPRECATED. If set to true, occurring stack traces are included in the - 'StackTrace' field in the GELF output. Default: true. Available only when - GELF is activated. ---log-gelf-level - DEPRECATED. The log level specifying which message levels will be logged by - the GELF logger. Message levels lower than this value will be discarded. - Default: INFO. Available only when GELF is activated. ---log-gelf-max-message-size - DEPRECATED. Maximum message size (in bytes). If the message size is exceeded, - GELF will submit the message in multiple chunks. Default: 8192. Available - only when GELF is activated. ---log-gelf-port - DEPRECATED. The port the Logstash or Graylog Host is called on. Default: - 12201. Available only when GELF is activated. ---log-gelf-timestamp-format - DEPRECATED. Set the format for the GELF timestamp field. Uses Java - SimpleDateFormat pattern. Default: yyyy-MM-dd HH:mm:ss,SSS. Available only - when GELF is activated. --log-level The log level of the root category or a comma-separated list of individual categories and their levels. For the root category, you don't need to diff --git a/quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testStartDevHelp.approved.txt b/quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testStartDevHelp.approved.txt index 25b97315e7..1ca9924845 100644 --- a/quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testStartDevHelp.approved.txt +++ b/quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testStartDevHelp.approved.txt @@ -254,7 +254,7 @@ Vault: Logging: --log Enable one or more log handlers in a comma-separated list. Possible values - are: console, file, syslog, gelf (deprecated). Default: console. + are: console, file, syslog. Default: console. --log-console-color Enable or disable colors when logging to console. Default: false. Available only when Console log handler is activated. diff --git a/quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testStartDevHelpAll.approved.txt b/quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testStartDevHelpAll.approved.txt index 9018f5942f..a3fca6f481 100644 --- a/quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testStartDevHelpAll.approved.txt +++ b/quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testStartDevHelpAll.approved.txt @@ -289,7 +289,7 @@ Vault: Logging: --log Enable one or more log handlers in a comma-separated list. Possible values - are: console, file, syslog, gelf (deprecated). Default: console. + are: console, file, syslog. Default: console. --log-console-color Enable or disable colors when logging to console. Default: false. Available only when Console log handler is activated. @@ -319,38 +319,6 @@ Logging: Set the log output to JSON or default (plain) unstructured logging. Possible values are: default, json. Default: default. Available only when File log handler is activated. ---log-gelf-facility - DEPRECATED. The facility (name of the process) that sends the message. - Default: keycloak. Available only when GELF is activated. ---log-gelf-host - DEPRECATED. Hostname of the Logstash or Graylog Host. By default UDP is used, - prefix the host with 'tcp:' to switch to TCP. Example: 'tcp:localhost' - Default: localhost. Available only when GELF is activated. ---log-gelf-include-location - DEPRECATED. Include source code location. Default: true. Available only when - GELF is activated. ---log-gelf-include-message-parameters - DEPRECATED. Include message parameters from the log event. Default: true. - Available only when GELF is activated. ---log-gelf-include-stack-trace - DEPRECATED. If set to true, occurring stack traces are included in the - 'StackTrace' field in the GELF output. Default: true. Available only when - GELF is activated. ---log-gelf-level - DEPRECATED. The log level specifying which message levels will be logged by - the GELF logger. Message levels lower than this value will be discarded. - Default: INFO. Available only when GELF is activated. ---log-gelf-max-message-size - DEPRECATED. Maximum message size (in bytes). If the message size is exceeded, - GELF will submit the message in multiple chunks. Default: 8192. Available - only when GELF is activated. ---log-gelf-port - DEPRECATED. The port the Logstash or Graylog Host is called on. Default: - 12201. Available only when GELF is activated. ---log-gelf-timestamp-format - DEPRECATED. Set the format for the GELF timestamp field. Uses Java - SimpleDateFormat pattern. Default: yyyy-MM-dd HH:mm:ss,SSS. Available only - when GELF is activated. --log-level The log level of the root category or a comma-separated list of individual categories and their levels. For the root category, you don't need to diff --git a/quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testStartHelp.approved.txt b/quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testStartHelp.approved.txt index 9c258cf0d5..7193c9909a 100644 --- a/quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testStartHelp.approved.txt +++ b/quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testStartHelp.approved.txt @@ -255,7 +255,7 @@ Vault: Logging: --log Enable one or more log handlers in a comma-separated list. Possible values - are: console, file, syslog, gelf (deprecated). Default: console. + are: console, file, syslog. Default: console. --log-console-color Enable or disable colors when logging to console. Default: false. Available only when Console log handler is activated. diff --git a/quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testStartHelpAll.approved.txt b/quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testStartHelpAll.approved.txt index 8f36c89c75..997e559cc4 100644 --- a/quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testStartHelpAll.approved.txt +++ b/quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testStartHelpAll.approved.txt @@ -290,7 +290,7 @@ Vault: Logging: --log Enable one or more log handlers in a comma-separated list. Possible values - are: console, file, syslog, gelf (deprecated). Default: console. + are: console, file, syslog. Default: console. --log-console-color Enable or disable colors when logging to console. Default: false. Available only when Console log handler is activated. @@ -320,38 +320,6 @@ Logging: Set the log output to JSON or default (plain) unstructured logging. Possible values are: default, json. Default: default. Available only when File log handler is activated. ---log-gelf-facility - DEPRECATED. The facility (name of the process) that sends the message. - Default: keycloak. Available only when GELF is activated. ---log-gelf-host - DEPRECATED. Hostname of the Logstash or Graylog Host. By default UDP is used, - prefix the host with 'tcp:' to switch to TCP. Example: 'tcp:localhost' - Default: localhost. Available only when GELF is activated. ---log-gelf-include-location - DEPRECATED. Include source code location. Default: true. Available only when - GELF is activated. ---log-gelf-include-message-parameters - DEPRECATED. Include message parameters from the log event. Default: true. - Available only when GELF is activated. ---log-gelf-include-stack-trace - DEPRECATED. If set to true, occurring stack traces are included in the - 'StackTrace' field in the GELF output. Default: true. Available only when - GELF is activated. ---log-gelf-level - DEPRECATED. The log level specifying which message levels will be logged by - the GELF logger. Message levels lower than this value will be discarded. - Default: INFO. Available only when GELF is activated. ---log-gelf-max-message-size - DEPRECATED. Maximum message size (in bytes). If the message size is exceeded, - GELF will submit the message in multiple chunks. Default: 8192. Available - only when GELF is activated. ---log-gelf-port - DEPRECATED. The port the Logstash or Graylog Host is called on. Default: - 12201. Available only when GELF is activated. ---log-gelf-timestamp-format - DEPRECATED. Set the format for the GELF timestamp field. Uses Java - SimpleDateFormat pattern. Default: yyyy-MM-dd HH:mm:ss,SSS. Available only - when GELF is activated. --log-level The log level of the root category or a comma-separated list of individual categories and their levels. For the root category, you don't need to diff --git a/quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testStartOptimizedHelp.approved.txt b/quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testStartOptimizedHelp.approved.txt index 9cc0fa491f..b4e5f48d05 100644 --- a/quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testStartOptimizedHelp.approved.txt +++ b/quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testStartOptimizedHelp.approved.txt @@ -206,7 +206,7 @@ Vault: Logging: --log Enable one or more log handlers in a comma-separated list. Possible values - are: console, file, syslog, gelf (deprecated). Default: console. + are: console, file, syslog. Default: console. --log-console-color Enable or disable colors when logging to console. Default: false. Available only when Console log handler is activated. diff --git a/quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testStartOptimizedHelpAll.approved.txt b/quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testStartOptimizedHelpAll.approved.txt index b821517c2b..4823c6c70f 100644 --- a/quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testStartOptimizedHelpAll.approved.txt +++ b/quarkus/tests/integration/src/test/resources/org/keycloak/it/cli/dist/approvals/cli/help/HelpCommandDistTest.testStartOptimizedHelpAll.approved.txt @@ -241,7 +241,7 @@ Vault: Logging: --log Enable one or more log handlers in a comma-separated list. Possible values - are: console, file, syslog, gelf (deprecated). Default: console. + are: console, file, syslog. Default: console. --log-console-color Enable or disable colors when logging to console. Default: false. Available only when Console log handler is activated. @@ -271,38 +271,6 @@ Logging: Set the log output to JSON or default (plain) unstructured logging. Possible values are: default, json. Default: default. Available only when File log handler is activated. ---log-gelf-facility - DEPRECATED. The facility (name of the process) that sends the message. - Default: keycloak. Available only when GELF is activated. ---log-gelf-host - DEPRECATED. Hostname of the Logstash or Graylog Host. By default UDP is used, - prefix the host with 'tcp:' to switch to TCP. Example: 'tcp:localhost' - Default: localhost. Available only when GELF is activated. ---log-gelf-include-location - DEPRECATED. Include source code location. Default: true. Available only when - GELF is activated. ---log-gelf-include-message-parameters - DEPRECATED. Include message parameters from the log event. Default: true. - Available only when GELF is activated. ---log-gelf-include-stack-trace - DEPRECATED. If set to true, occurring stack traces are included in the - 'StackTrace' field in the GELF output. Default: true. Available only when - GELF is activated. ---log-gelf-level - DEPRECATED. The log level specifying which message levels will be logged by - the GELF logger. Message levels lower than this value will be discarded. - Default: INFO. Available only when GELF is activated. ---log-gelf-max-message-size - DEPRECATED. Maximum message size (in bytes). If the message size is exceeded, - GELF will submit the message in multiple chunks. Default: 8192. Available - only when GELF is activated. ---log-gelf-port - DEPRECATED. The port the Logstash or Graylog Host is called on. Default: - 12201. Available only when GELF is activated. ---log-gelf-timestamp-format - DEPRECATED. Set the format for the GELF timestamp field. Uses Java - SimpleDateFormat pattern. Default: yyyy-MM-dd HH:mm:ss,SSS. Available only - when GELF is activated. --log-level The log level of the root category or a comma-separated list of individual categories and their levels. For the root category, you don't need to