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

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


The following commit(s) were added to refs/heads/2.x by this push:
     new 26cc544418 Improve AsciiDoc admonition styling
26cc544418 is described below

commit 26cc5444185838175740fd8ef6817b7a5ca541e4
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/api.adoc                | 2 +-
 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 +-
 7 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/antora-playbook.yaml b/antora-playbook.yaml
index 53b77c1c9c..3fd41624b9 100644
--- a/antora-playbook.yaml
+++ b/antora-playbook.yaml
@@ -86,6 +86,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/api.adoc 
b/src/site/antora/modules/ROOT/pages/manual/api.adoc
index 50a0c5e0e4..174c5abcfc 100644
--- a/src/site/antora/modules/ROOT/pages/manual/api.adoc
+++ b/src/site/antora/modules/ROOT/pages/manual/api.adoc
@@ -362,7 +362,7 @@ ThreadContext.clear(); // <5>
 <4> Popping the last pushed property from the thread context stack
 <5> Clearing the thread context (for both stack and map!)
 
-[CAUTION]
+[WARNING]
 ====
 **Thread Context is mostly superseded by Scoped Context**, which, unlike 
Thread Context,
 
diff --git a/src/site/antora/modules/ROOT/pages/manual/appenders.adoc 
b/src/site/antora/modules/ROOT/pages/manual/appenders.adoc
index 5e8300a271..484b4ff38e 100644
--- a/src/site/antora/modules/ROOT/pages/manual/appenders.adoc
+++ b/src/site/antora/modules/ROOT/pages/manual/appenders.adoc
@@ -1935,7 +1935,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 65ff085619..c3e42c8b0e 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 65b2648ea0..5d9b94627b 100644
--- a/src/site/antora/modules/ROOT/pages/manual/configuration.adoc
+++ b/src/site/antora/modules/ROOT/pages/manual/configuration.adoc
@@ -48,7 +48,7 @@ The default configuration prints all messages less specific 
than
 xref:manual/systemproperties.adoc#log4j2.level[`log4j2.level`]
 to the console.
 
-[CAUTION]
+[WARNING]
 ====
 The configuration files prefixed by `log4j2-test` should only be used on the 
test classpath.
 
@@ -375,7 +375,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, which implies that the 
reconfiguration process can not lose any log event.
 In order to achieve this Log4j does **not** stop any appender until the new 
`Configuration` is active and **reuses** resources that are present in both the 
old and the new `Configuration`.
@@ -614,7 +614,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 xref:manual/thread-context.adoc[ThreadContext].
 
-[CAUTION]
+[WARNING]
 ====
 The `value` of each property is subject to <<property-substitution,property 
substitution>> twice:
 
@@ -850,7 +850,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 4d5eb2ec1e..0ca7677c19 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
@@ -43,7 +43,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