This is an automated email from the ASF dual-hosted git repository.

vy pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git

commit 84437b6a35fd68d44b0ea53e1f4a7b767987a48b
Author: Volkan Yazıcı <[email protected]>
AuthorDate: Thu Jun 20 09:36:28 2024 +0200

    Improve AsciiDoc admonition styling
    
    Replaced `CAUTION` with `WARNING`. Their difference is irrelevant
    99% of the time, and non-native speakers certainly don't know the
    difference.
    
    Swapped colors of `IMPORTANT` and `WARNING`. The current way things
     are – `IMPORTANT` is in red, while WARNING is in orange – is
     completely opposite of visual expectations while reading pages.
---
 antora-playbook.yaml                                              | 3 +++
 src/site/antora/modules/ROOT/pages/manual/appenders.adoc          | 2 +-
 src/site/antora/modules/ROOT/pages/manual/async.adoc              | 2 +-
 src/site/antora/modules/ROOT/pages/manual/configuration.adoc      | 8 ++++----
 src/site/antora/modules/ROOT/pages/manual/filters.adoc            | 2 +-
 .../antora/modules/ROOT/partials/manual/async-trade-offs.adoc     | 2 +-
 6 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/antora-playbook.yaml b/antora-playbook.yaml
index 40fd9d0e42..5c37f9d4a8 100644
--- a/antora-playbook.yaml
+++ b/antora-playbook.yaml
@@ -87,6 +87,9 @@ ui:
         <!-- `@asciidoctor/tabs` extension styles -->
         <link rel="stylesheet" href="{{{uiRootPath}}}/css/vendor/tabs.css">
         <style>
+          /* Swap colors of `IMPORTANT` and `WARNING` blocks */ 
+          .doc .admonitionblock.important .icon { background-color: #f70; }
+          .doc .admonitionblock.warning .icon { background-color: #e40046; }
           /* Default `h4`, `h5`, and `h6` are smaller than the normal text, 
fix header font sizing: */
           .doc h1 { font-size: 1.9rem; }
           .doc h2 { font-size: 1.7rem; }
diff --git a/src/site/antora/modules/ROOT/pages/manual/appenders.adoc 
b/src/site/antora/modules/ROOT/pages/manual/appenders.adoc
index 8059bed475..4d3789b991 100644
--- a/src/site/antora/modules/ROOT/pages/manual/appenders.adoc
+++ b/src/site/antora/modules/ROOT/pages/manual/appenders.adoc
@@ -1797,7 +1797,7 @@ If your application contains any one of these 
dependencies, it might use the **L
 If you application only uses `org.mongodb:mongodb-driver-sync`, it uses the 
**Modern API**.
 ====
 
-[CAUTION]
+[WARNING]
 ====
 The version of the MongoDB Java driver is not the same as the version of the 
MongoDB server.
 See
diff --git a/src/site/antora/modules/ROOT/pages/manual/async.adoc 
b/src/site/antora/modules/ROOT/pages/manual/async.adoc
index 23ab646f13..b14fedb58c 100644
--- a/src/site/antora/modules/ROOT/pages/manual/async.adoc
+++ b/src/site/antora/modules/ROOT/pages/manual/async.adoc
@@ -33,7 +33,7 @@ a lock-free inter-thread communication library, instead of 
queues, resulting in
 +
 The rest of this chapter is dedicated to this new component.
 
-[CAUTION]
+[WARNING]
 ====
 Logging performance depends greatly on the architecture of your application 
and the way you use logging.
 The solutions offered by this chapter should be evaluated using benchmarks 
against your own application.
diff --git a/src/site/antora/modules/ROOT/pages/manual/configuration.adoc 
b/src/site/antora/modules/ROOT/pages/manual/configuration.adoc
index 89ec67a8c9..590ab375f1 100644
--- a/src/site/antora/modules/ROOT/pages/manual/configuration.adoc
+++ b/src/site/antora/modules/ROOT/pages/manual/configuration.adoc
@@ -42,7 +42,7 @@ The default configuration prints all messages less specific 
than
 
xref:manual/systemproperties.adoc#log4j.configuration.level[`log4j.configuration.level`]
 to the console.
 
-[CAUTION]
+[WARNING]
 ====
 The configuration files prefixed by `log4j2-test` should only be used on the 
test classpath.
 
@@ -374,7 +374,7 @@ Determines the polling interval used by Log4j to check for 
changes to the config
 If a change in the configuration file is detected, Log4j automatically 
reconfigures the logger context.
 If set to `0`, polling is disabled.
 
-[CAUTION]
+[WARNING]
 ====
 Log4j Core is designed with reliability in mind, unlike other logging backends.
 
@@ -617,7 +617,7 @@ See <<configuring-appenderrefs>> below for more details.
 
 Loggers can emit additional context data that will be integrated with other 
context data sources such as {log4j2-url}/manual/thread-context.html[thread 
context].
 
-[CAUTION]
+[WARNING]
 ====
 The `value` of each property is subject to <<property-substitution,property 
substitution>> twice:
 
@@ -855,7 +855,7 @@ and the OS environment variable `FOO` has a value of 
`environment`, Log4j will e
 |===
 =====
 
-[CAUTION]
+[WARNING]
 =====
 For security reasons, if the **expansion** of a `${...}` expression contains 
other expressions, these will **not** be expanded.
 The only exception to this rule is the expansion of properties in the 
`Properties` container.
diff --git a/src/site/antora/modules/ROOT/pages/manual/filters.adoc 
b/src/site/antora/modules/ROOT/pages/manual/filters.adoc
index baea1d507b..fe7fc308cb 100644
--- a/src/site/antora/modules/ROOT/pages/manual/filters.adoc
+++ b/src/site/antora/modules/ROOT/pages/manual/filters.adoc
@@ -72,7 +72,7 @@ If the logger is additive, the filter on the parent logger is 
applied recursivel
 <5> followed by a level check against the configured level of the reference.
 <6> The process ends with the filter attached to an appender.
 
-[CAUTION]
+[WARNING]
 ====
 For performance reasons, log events should be filtered as soon as possible in 
the logging pipeline.
 This reduces the costs (formatting, transfer through an asynchronous barrier) 
of disabled log events.
diff --git a/src/site/antora/modules/ROOT/partials/manual/async-trade-offs.adoc 
b/src/site/antora/modules/ROOT/partials/manual/async-trade-offs.adoc
index ce59f30303..cf9628924c 100644
--- a/src/site/antora/modules/ROOT/partials/manual/async-trade-offs.adoc
+++ b/src/site/antora/modules/ROOT/partials/manual/async-trade-offs.adoc
@@ -44,7 +44,7 @@ Error handling::
 If a problem happens during the logging process and an exception is thrown, it 
is less easy for an asynchronous setting to signal this problem to the 
application.
 This can partly be alleviated by configuring an exception handler, but this 
may still not cover all cases.
 +
-[CAUTION]
+[WARNING]
 ====
 If logging is part of your business logic, e.g. you are using Log4j as an 
audit logging framework, we would recommend to synchronously log those audit 
messages.
 

Reply via email to