You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
More hosts allowed for Dev UI Comma separated list of valid URLs, e.g.: www.quarkus.io, myhost.com (This can also be a regex) By default localhost and 127.0.0.1 will always be allowed
12123
+
More hosts allowed for Dev UI Comma separated list of valid URLs, e.g.: www.quarkus.io, myhost.com (This can also be a regex, e.g.: ^(++[++A-Za-z0-9-++]++{plus}).apps.myhost.com) By default localhost and 127.0.0.1 will always be allowed Note: Wildcards are not supported (e.g.: ++*++.apps.myhost.com)
More hosts allowed for Dev UI Comma separated list of valid URLs, e.g.: www.quarkus.io, myhost.com (This can also be a regex) By default localhost and 127.0.0.1 will always be allowed
81
+
More hosts allowed for Dev UI Comma separated list of valid URLs, e.g.: www.quarkus.io, myhost.com (This can also be a regex, e.g.: ^(++[++A-Za-z0-9-++]++{plus}).apps.myhost.com) By default localhost and 127.0.0.1 will always be allowed Note: Wildcards are not supported (e.g.: ++*++.apps.myhost.com)
More hosts allowed for Dev UI Comma separated list of valid URLs, e.g.: www.quarkus.io, myhost.com (This can also be a regex) By default localhost and 127.0.0.1 will always be allowed
81
+
More hosts allowed for Dev UI Comma separated list of valid URLs, e.g.: www.quarkus.io, myhost.com (This can also be a regex, e.g.: ^(++[++A-Za-z0-9-++]++{plus}).apps.myhost.com) By default localhost and 127.0.0.1 will always be allowed Note: Wildcards are not supported (e.g.: ++*++.apps.myhost.com)
Copy file name to clipboardExpand all lines: _versions/main/guides/logging.adoc
+18-8Lines changed: 18 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -363,6 +363,8 @@ Although the root logger's handlers are usually configured directly via `quarkus
363
363
364
364
== Logging format
365
365
366
+
=== Human-readable text
367
+
366
368
{project-name} uses a pattern-based logging formatter that generates human-readable text logs by default, but you can also configure the format for each log handler by using a dedicated property.
367
369
368
370
For the console handler, the property is `quarkus.log.console.format`.
@@ -399,14 +401,8 @@ The logging format string supports the following symbols:
399
401
|%x|Nested Diagnostics context values|Renders all the values from Nested Diagnostics Context in format `{value1.value2}`.
400
402
|===
401
403
402
-
403
-
[id="alt-console-format"]
404
-
=== Alternative console logging formats
405
-
406
-
Changing the console log format is useful, for example, when the console output of the Quarkus application is captured by a service that processes and stores the log information for later analysis.
407
-
408
404
[id="json-logging"]
409
-
==== JSON logging format
405
+
=== JSON logging format
410
406
411
407
The `quarkus-logging-json` extension might be employed to add support for the JSON logging format and its related configuration.
412
408
@@ -441,7 +437,21 @@ This can be achieved using different profiles, as shown in the following configu
441
437
%test.quarkus.log.console.json.enabled=false
442
438
----
443
439
444
-
===== Configuration
440
+
+
441
+
. Choose the JSON logging format by setting the config property:
442
+
[source, properties]
443
+
----
444
+
quarkus.log.console.json.log-format
445
+
----
446
+
This case will set the format for the console. The config values are:
447
+
448
+
* *default*: Will generate structured logging based on the `key,values` present in the log record. MDC and NDC data will be also included nested in `mdc` and `ndc` fields.
449
+
* *ecs*: https://www.elastic.co/docs/reference/ecs/ecs-field-reference[Elastic Common Fields]. Some default fields names are modified and some otheres are added to better comply with ECS. Namely: `@timestamp`,`log.logger`, `log.level`, `process.pid`, `process.name`, `process.thread.name`, `process.thread.id`, `host.hostname`, `event.sequence`, `error.message`, `error.stack_trace`, `ecs.version`, `data_stream.type`, `service.name`, `service.version` and `service.environment`.
450
+
* *gcp*: https://cloud.google.com/logging/docs/structured-logging#structured_logging_special_fields[Google Cloud]. Follows the `Default` format and when the xref:opentelemetry-tracing.adoc[OpenTelemetry] is used, tracing data present in the `mdc` field is flattened and copied to `spanId`, `traceSampled` and `trace`, but this last one with a prefix. GCP requires the `trace` to follow this semantic: `"projects/<my-trace-project>/traces/12345"`. Where `<my-trace-project>` has the same value as the `quarkus.application.name` config property.
451
+
+
452
+
453
+
454
+
==== Configuration
445
455
446
456
Configure the JSON logging extension using supported properties to customize its behavior.
<3> The additional path that should be appended to the base URI.
1360
1367
<4> Set the execution model for callback handlers. By default, the callback may block the current thread. However in this case, the callback is executed on the event loop and may not block the current thread.
1361
1368
<5> The lambda will be called for every text message sent from the server.
1369
+
<6> Optionally, customize client and connection options not configurable with the connector API or Quarkus configuration.
1362
1370
1363
1371
The basic connector is closer to a low-level API and is reserved for advanced users.
1364
1372
However, unlike others low-level WebSocket clients, it is still a CDI bean and can be injected in other beans.
0 commit comments