Skip to content

Commit 4b86371

Browse files
committed
Sync documentation of main branch
1 parent c2d383c commit 4b86371

File tree

6 files changed

+295
-56
lines changed

6 files changed

+295
-56
lines changed

_generated-doc/main/infra/quarkus-maven-plugin-goals.adoc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1246,6 +1246,11 @@ a| [[quarkus-maven-plugin-goal-dev-environmentVariables]] environmentVariables
12461246
|
12471247

12481248
a| [[quarkus-maven-plugin-goal-dev-jvmArgs]] jvmArgs
1249+
1250+
[.description]
1251+
--
1252+
Allows configuring arbitrary JVM arguments. Multiple arguments can be specified by delimiting them with a space character.
1253+
--
12491254
|`String`
12501255
|`${jvm.args}`
12511256

@@ -2901,6 +2906,11 @@ a| [[quarkus-maven-plugin-goal-remote-dev-environmentVariables]] environmentVari
29012906
|
29022907

29032908
a| [[quarkus-maven-plugin-goal-remote-dev-jvmArgs]] jvmArgs
2909+
2910+
[.description]
2911+
--
2912+
Allows configuring arbitrary JVM arguments. Multiple arguments can be specified by delimiting them with a space character.
2913+
--
29042914
|`String`
29052915
|`${jvm.args}`
29062916

@@ -3371,6 +3381,11 @@ a| [[quarkus-maven-plugin-goal-test-environmentVariables]] environmentVariables
33713381
|
33723382

33733383
a| [[quarkus-maven-plugin-goal-test-jvmArgs]] jvmArgs
3384+
3385+
[.description]
3386+
--
3387+
Allows configuring arbitrary JVM arguments. Multiple arguments can be specified by delimiting them with a space character.
3388+
--
33743389
|`String`
33753390
|`${jvm.args}`
33763391

_versions/main/guides/logging.adoc

Lines changed: 50 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ include::_attributes.adoc[]
1010
:diataxis-type: reference
1111
:topics: logging,observability
1212

13-
Read about the use of logging API in Quarkus, configuring logging output, and using logging adapters to unify the output from other logging APIs.
13+
Read about the use of logging API in {project-name}, configuring logging output, and using logging adapters to unify the output from other logging APIs.
1414

1515
Quarkus uses the JBoss Log Manager logging backend for publishing application and framework logs.
1616
Quarkus supports the JBoss Logging API and multiple other logging APIs, seamlessly integrated with JBoss Log Manager.
@@ -26,7 +26,7 @@ You can use any of the <<logging-apis,following APIs>>:
2626
[[jboss-logging]]
2727
== Use JBoss Logging for application logging
2828

29-
When using the JBoss Logging API, your application requires no additional dependencies, as Quarkus automatically provides it.
29+
When using the JBoss Logging API, your application requires no additional dependencies, as {project-name} automatically provides it.
3030

3131
.An example of using the JBoss Logging API to log a message:
3232
[source,java]
@@ -57,7 +57,7 @@ In such cases, you need to use a <<logging-apis,logging adapter>> to ensure that
5757

5858
== Get an application logger
5959

60-
In Quarkus, the most common ways to obtain an application logger are by:
60+
To get an application logger in {project-name}, select one of the following approaches.
6161

6262
* <<declaring-a-logger-field>>
6363
* <<simplified-logging>>
@@ -95,7 +95,7 @@ public class MyService {
9595
Quarkus simplifies logging by automatically adding logger fields to classes that use `io.quarkus.logging.Log`.
9696
This eliminates the need for repetitive boilerplate code and enhances logging setup convenience.
9797

98-
.An example of simplified logging using static method calls:
98+
.An example of simplified logging with static method calls:
9999
[source,java]
100100
----
101101
package com.example;
@@ -149,27 +149,28 @@ class SimpleBean {
149149
}
150150
}
151151
----
152-
<1> The FQCN of the declaring class is used as a logger name, for example, `org.jboss.logging.Logger.getLogger(SimpleBean.class)` will be used.
153-
<2> In this case, the name _foo_ is used as a logger name, for example,`org.jboss.logging.Logger.getLogger("foo")` will be used.
152+
<1> The fully qualified class name (FQCN) of the declaring class is used as a logger name, for example, `org.jboss.logging.Logger.getLogger(SimpleBean.class)` will be used.
153+
<2> In this case, the name _foo_ is used as a logger name, for example, `org.jboss.logging.Logger.getLogger("foo")` will be used.
154154

155-
NOTE: The logger instances are cached internally. Therefore, when a logger is injected, for example, into a `@RequestScoped` bean, it is shared for all bean instances to avoid possible performance penalties associated with logger instantiation.
155+
NOTE: The logger instances are cached internally.
156+
Therefore, when a logger is injected, for example, into a `@RequestScoped` bean, it is shared for all bean instances to avoid possible performance penalties associated with logger instantiation.
156157

157158

158159
== Use log levels
159160

160-
Quarkus provides different log levels, which helps developers control the amount of information logged based on the severity of the events.
161+
{project-name} provides different log levels, which helps developers to control the amount of information logged based on the severity of the events.
161162

162-
.Log levels used by Quarkus
163+
.Available log levels:
163164

164165
[horizontal]
165-
OFF:: A special level to use in configuration in order to turn off logging.
166-
FATAL:: A critical service failure or complete inability to service requests of any kind.
167-
ERROR:: A significant disruption in a request or the inability to service a request.
168-
WARN:: A non-critical service error or problem that may not require immediate correction.
169-
INFO:: Service lifecycle events or important related very low-frequency information.
170-
DEBUG:: Messages that convey extra information regarding lifecycle or non-request-bound events, useful for debugging.
171-
TRACE:: Messages that convey extra per-request debugging information that may be very high frequency.
172-
ALL:: A special level to use in configuration to turn on logging for all messages, including custom levels.
166+
OFF:: A special level used in configuration to turn off logging.
167+
FATAL:: A critical service failure or total inability to handle any requests.
168+
ERROR:: A major issue in processing or an inability to complete a request.
169+
WARN:: A non-critical service error or problem that might not require immediate correction.
170+
INFO:: Service lifecycle events or other important infrequent information.
171+
DEBUG:: Additional information about lifecycle events or events not tied to specific requests, useful for debugging.
172+
TRACE:: Detailed per-request debugging information, potentially at a very high frequency.
173+
ALL:: A special level to turn on logging for all messages, including custom levels.
173174

174175
You can also configure the following levels for applications and libraries that use link:https://docs.oracle.com/javase/8/docs/api/java/util/logging/Level.html[`java.util.logging`]:
175176

@@ -206,7 +207,7 @@ FINEST:: Increased debug output compared to `TRACE`, which might have a higher f
206207

207208
== Configure the log level, category, and format
208209

209-
JBoss Logging, integrated into Quarkus, offers a unified configuration for all <<logging-apis,supported logging APIs>> through a single configuration file that sets up all available extensions.
210+
JBoss Logging, integrated into {project-name}, offers a unified configuration for all <<logging-apis,supported logging APIs>> through a single configuration file that sets up all available extensions.
210211
To adjust runtime logging, modify the `application.properties` file.
211212

212213
.An example of how you can set the default log level to `INFO` logging and include Hibernate `DEBUG` logs:
@@ -217,7 +218,7 @@ quarkus.log.category."org.hibernate".level=DEBUG
217218
----
218219

219220
When you set the log level to below `DEBUG`, you must also adjust the minimum log level.
220-
This setting is either global, using the `quarkus.log.min-level` configuration property, or per category:
221+
This setting might be applied either globally with the `quarkus.log.min-level` configuration property, or per category:
221222

222223
[source, properties]
223224
----
@@ -286,8 +287,11 @@ For further demonstration, see the outputs of the <<category-named-handlers-exam
286287
[cols="<m,<m,<2",options="header"]
287288
|===
288289
|Property Name|Default|Description
289-
|quarkus.log.category."<category-name>".level|INFO footnote:[Some extensions may define customized default log levels for certain categories, in order to reduce log noise by default. Setting the log level in configuration will override any extension-defined log levels.]|The level to use to configure the category named `<category-name>`. The quotes are necessary.
290-
|quarkus.log.category."<category-name>".min-level|DEBUG |The minimum logging level to use to configure the category named `<category-name>`. The quotes are necessary.
290+
|quarkus.log.category."<category-name>".level|INFO footnote:[Some extensions might define customized default log levels for certain categories to reduce log noise by default.
291+
Setting the log level in configuration will override any extension-defined log levels.]|The level to use to configure the category named `<category-name>`.
292+
The quotes are necessary.
293+
|quarkus.log.category."<category-name>".min-level|DEBUG |The minimum logging level to use to configure the category named `<category-name>`.
294+
The quotes are necessary.
291295
|quarkus.log.category."<category-name>".use-parent-handlers|true|Specify whether this logger should send its output to its parent logger.
292296
|quarkus.log.category."<category-name>".handlers=[<handler>]|empty footnote:[By default, the configured category gets the same handlers attached as the one on the root logger.]|The names of the handlers that you want to attach to a specific category.
293297
|===
@@ -321,7 +325,7 @@ Although the root logger's handlers are usually configured directly via `quarkus
321325

322326
== Logging format
323327

324-
Quarkus 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.
328+
{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.
325329

326330
For the console handler, the property is `quarkus.log.console.format`.
327331

@@ -333,12 +337,12 @@ The logging format string supports the following symbols:
333337

334338
|%%|`%`|Renders a simple `%` character.
335339
|%c|Category|Renders the category name.
336-
|%C|Source class|Renders the source class name.footnote:calc[Format sequences which examine caller information may affect performance]
340+
|%C|Source class|Renders the source class name.footnote:calc[Format sequences which examine caller information might affect performance]
337341
|%d{xxx}|Date|Renders a date with the given date format string, which uses the syntax defined by `java.text.SimpleDateFormat`.
338342
|%e|Exception|Renders the thrown exception, if any.
339343
|%F|Source file|Renders the source file name.footnote:calc[]
340344
|%h|Host name|Renders the system simple host name.
341-
|%H|Qualified host name|Renders the system's fully qualified host name, which may be the same as the simple host name, depending on operating system configuration.
345+
|%H|Qualified host name|Renders the system's fully qualified host name, which might be the same as the simple host name, depending on operating system configuration.
342346
|%i|Process ID|Render the current process PID.
343347
|%l|Source location|Renders the source location information, which includes source file name, line number, class name, and method name.footnote:calc[]
344348
|%L|Source line|Renders the source line number.footnote:calc[]
@@ -363,11 +367,10 @@ The logging format string supports the following symbols:
363367

364368
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.
365369

366-
367370
[id="json-logging"]
368371
==== JSON logging format
369372

370-
The `quarkus-logging-json` extension may be employed to add support for the JSON logging format and its related configuration.
373+
The `quarkus-logging-json` extension might be employed to add support for the JSON logging format and its related configuration.
371374

372375
. Add this extension to your build file as the following snippet illustrates:
373376
+
@@ -387,7 +390,7 @@ implementation("io.quarkus:quarkus-logging-json")
387390
----
388391
+
389392
By default, the presence of this extension replaces the output format configuration from the console configuration, and the format string and the color settings (if any) are ignored.
390-
The other console configuration items, including those controlling asynchronous logging and the log level, will continue to be applied.
393+
The other console configuration items, including those that control asynchronous logging and the log level, will continue to be applied.
391394
+
392395
For some, it will make sense to use humanly readable (unstructured) logging in dev mode and JSON logging (structured) in production mode.
393396
This can be achieved using different profiles, as shown in the following configuration.
@@ -415,7 +418,7 @@ The details include the source class name, source file name, source method name,
415418
== Log handlers
416419

417420
A log handler is a logging component responsible for the emission of log events to a recipient.
418-
Quarkus includes several different log handlers: **console**, **file**, and **syslog**.
421+
{project-name} includes several different log handlers: **console**, **file**, and **syslog**.
419422

420423
The featured examples use `com.example` as a logging category.
421424

@@ -450,7 +453,7 @@ The file log handler is disabled by default, so you must first enable it.
450453

451454
The Quarkus file log handler supports log file rotation.
452455

453-
Log file rotation ensures effective log file management over time by maintaining a specified number of backup log files, while keeping the primary log file up-to-date and manageable.
456+
Log file rotation ensures efficient log management by preserving a specified number of backup files while keeping the primary log file updated and at a manageable size.
454457

455458
* A global configuration example:
456459
+
@@ -479,7 +482,7 @@ For details about its configuration, see the xref:#quarkus-core_section_quarkus-
479482
=== Syslog log handler
480483

481484
The syslog handler in Quarkus follows the link:https://en.wikipedia.org/wiki/Syslog[Syslog] protocol, which is used to send log messages on UNIX-like systems.
482-
It utilizes the protocol defined in link:https://tools.ietf.org/html/rfc5424[RFC 5424].
485+
It uses the protocol defined in link:https://tools.ietf.org/html/rfc5424[RFC 5424].
483486

484487
By default, the syslog handler is disabled.
485488
When enabled, it sends all log events to a syslog server, typically the local syslog server for the application.
@@ -560,7 +563,7 @@ quarkus.log.console.filter=my-filter
560563

561564
== Examples of logging configurations
562565

563-
The following examples show some of the ways in which you can configure logging in Quarkus:
566+
The following examples show some of the ways in which you can configure logging in {project-name}:
564567

565568
.Console DEBUG logging except for Quarkus logs (INFO), no color, shortened time, shortened category prefixes
566569
[source, properties]
@@ -590,7 +593,7 @@ quarkus.log.category."io.quarkus.smallrye.jwt".level=TRACE
590593
quarkus.log.category."io.undertow.request.security".level=TRACE
591594
----
592595

593-
NOTE: As we don't change the root logger, the console log will only contain `INFO` or higher level logs.
596+
NOTE: As we do not change the root logger, the console log contains only `INFO` or higher level logs.
594597

595598
[[category-named-handlers-example]]
596599
.Named handlers attached to a category
@@ -670,7 +673,7 @@ See also <<getting-started-testing.adoc#test-from-ide,Running `@QuarkusTest` fro
670673
[[logging-apis]]
671674
== Use other logging APIs
672675

673-
Quarkus relies on the JBoss Logging library for all the logging requirements.
676+
{project-name} relies on the JBoss Logging library for all the logging requirements.
674677

675678
Suppose you use libraries that depend on other logging libraries, such as Apache Commons Logging, Log4j, or SLF4J.
676679
In that case, exclude them from the dependencies and use one of the JBoss Logging adapters.
@@ -747,7 +750,7 @@ implementation("org.jboss.logmanager:log4j2-jboss-logmanager")
747750
+
748751
[NOTE]
749752
====
750-
Do not include any Log4j dependencies because the `log4j2-jboss-logmanager` library contains all that is needed to use Log4j as a logging implementation.
753+
Do not include any Log4j dependencies, as the `log4j2-jboss-logmanager` library contains everything needed to use Log4j as a logging implementation.
751754
====
752755

753756
* SLF4J:
@@ -771,19 +774,18 @@ implementation("org.jboss.slf4j:slf4j-jboss-logmanager")
771774

772775
=== Use MDC to add contextual log information
773776

774-
Quarkus overrides the logging Mapped Diagnostic Context (MDC) to improve the compatibility with its reactive core.
777+
Quarkus overrides the logging Mapped Diagnostic Context (MDC) to improve compatibility with its reactive core.
775778

776779
==== Add and read MDC data
777780

778781
To add data to the MDC and extract it in your log output:
779782

780783
. Use the `MDC` class to set the data.
781-
. Customize the log format to use `%X\{mdc-key\}`.
782-
783-
Let's consider the following code:
784-
785-
[source, java]
786-
.Example with JBoss Logging and `io.quarkus.logging.Log`
784+
.. Add `import org.jboss.logmanager.MDC;`
785+
.. Set `MDC.put(...)` as shown in the example below:
786+
+
787+
[source,java]
788+
.An example with JBoss Logging and `io.quarkus.logging.Log`
787789
----
788790
package me.sample;
789791
@@ -808,24 +810,23 @@ public class GreetingResourceJbossLogging {
808810
}
809811
----
810812

811-
If you configure the log format with the following line:
812-
813+
. Configure the log format to use `%X\{mdc-key\}`:
814+
+
813815
[source, properties]
814816
----
815817
quarkus.log.console.format=%d{HH:mm:ss} %-5p request.id=%X{request.id} request.path=%X{request.path} [%c{2.}] (%t) %s%n
816818
----
817-
818-
You get messages containing the MDC data:
819-
819+
+
820+
The resulting message contains the MDC data:
821+
+
820822
[source, text]
821823
----
822824
08:48:13 INFO request.id=c37a3a36-b7f6-4492-83a1-de41dbc26fe2 request.path=/hello/test [me.sa.GreetingResourceJbossLogging] (executor-thread-1) request received
823825
----
824826

825827
==== MDC and supported logging APIs
826828

827-
Depending on the API you use, the MDC class is slightly different.
828-
However, the APIs are very similar:
829+
Based on your logging API, use one of the following MDC classes:
829830

830831
* Log4j 1 - `org.apache.log4j.MDC.put(key, value)`
831832
* Log4j 2 - `org.apache.logging.log4j.ThreadContext.put(key, value)`
@@ -842,7 +843,7 @@ As a result, you can still access the MDC data in various scenarios:
842843
* In code submitted to `org.eclipse.microprofile.context.ManagedExecutor`.
843844
* In code executed with `vertx.executeBlocking()`.
844845

845-
NOTE: If applicable, MDC data is stored in a _duplicated context_, which is an isolated context for processing a single task (request).
846+
NOTE: If applicable, MDC data is stored in a _duplicated context_, which is an isolated context for processing a single task or request.
846847

847848

848849
[[loggingConfigurationReference]]

_versions/main/guides/qute-reference.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2395,12 +2395,12 @@ public class Statuses {
23952395
public static final String OFF = "off";
23962396
}
23972397
----
2398-
<1> A name resolver with the namespace `model_Status` is generated automatically.
2398+
<1> A name resolver with the namespace `model_Statuses` is generated automatically.
23992399

24002400
.Template Accessing Class Constants
24012401
[source,html]
24022402
----
2403-
{#if machine.status == model_Status:ON}
2403+
{#if machine.status == model_Statuses:ON}
24042404
The machine is ON!
24052405
{/if}
24062406
----

0 commit comments

Comments
 (0)