Skip to content

Commit

Permalink
Merge pull request quarkusio#35988 from MichalMaler/Logging-asciidoc-…
Browse files Browse the repository at this point in the history
…pass

Enhancements to Configuration section of the Logging guide
  • Loading branch information
Sanne authored Sep 19, 2023
2 parents fe16659 + 9ad855f commit 8a0d070
Showing 1 changed file with 26 additions and 5 deletions.
31 changes: 26 additions & 5 deletions docs/src/main/asciidoc/logging.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -241,13 +241,34 @@ All potential properties are listed in the <<loggingConfigurationReference,loggi

=== Logging categories

Logging is done on a per-category basis, with each category being configured independently.
A category configuration recursively applies to all subcategories of that category unless there is a more specific matching sub-category configuration.
Logging is configured on a per-category basis, with each category being configured independently.
Configuration for a category applies recursively to all subcategories unless there is a more specific subcategory configuration.

The parent of all logging categories is called the "root category".
This category, being the ultimate parent, may contain configuration which applies globally to all other categories. This includes the globally configured handlers and formatters.
The parent of all logging categories is called the "root category."
As the ultimate parent, this category might contain a configuration that applies globally to all other categories.
This includes the globally configured handlers and formatters.

.An example of a global configuration that applies to all categories:
====
[source, properties]
----
quarkus.log.handlers=console,mylog
----
In this example, the root category is configured to use two handlers: `console` and `mylog`.
====

.An example of a per-category configuration:
====
[source, properties]
----
quarkus.log.category."org.apache.kafka.clients".level=INFO
quarkus.log.category."org.apache.kafka.common.utils".level=INFO
----
This example shows how you can configure the minimal log level on the categories `org.apache.kafka.clients` and `org.apache.kafka.common.utils`.
====

Thus, configurations made under `quarkus.log.console.+*+`, `quarkus.log.file.+*+`, and `quarkus.log.syslog.+*+` are global and apply for all categories.
For more information, see <<loggingConfigurationReference>>.

If you want to configure something extra for a specific category, create a named handler like `quarkus.log.handler.[console|file|syslog].<your-handler-name>.*` and set it up for that category by using `quarkus.log.category.<my-category>.handlers`.
Expand Down

0 comments on commit 8a0d070

Please sign in to comment.