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

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

commit 69f912c9c34399e2daeae5c1ab6b5033033dca9d
Author: Volkan Yazıcı <[email protected]>
AuthorDate: Thu Oct 5 10:26:03 2023 +0200

    Fix certain website issues
---
 src/site/markdown/download.md.vm         |  4 +-
 src/site/markdown/maven-artifacts.md.vm  | 27 ----------
 src/site/resources/manual/scala-api.html | 28 ++++++++++
 src/site/site.xml                        |  3 +-
 src/site/xdoc/manual/scala-api.xml       | 93 --------------------------------
 src/site/xdoc/runtime-dependencies.xml   |  7 ---
 6 files changed, 32 insertions(+), 130 deletions(-)

diff --git a/src/site/markdown/download.md.vm b/src/site/markdown/download.md.vm
index 441046a39c..d5e4f78679 100644
--- a/src/site/markdown/download.md.vm
+++ b/src/site/markdown/download.md.vm
@@ -18,6 +18,8 @@
 #set($h1='#')
 #set($h2='##')
 #set($h3='###')
+#set($Log4jReleaseVersionJava7 = '2.12.4')
+#set($Log4jReleaseVersionJava6 = '2.3.2')
 
 $h1 Download Apache Log4j™ 2
 
@@ -73,7 +75,6 @@ All previous releases of Apache log4j can be found in the
 [ASF archive repository](https://archive.apache.org/dist/logging/log4j/). Of 
course, all releases are available for
 use as dependencies from the [Maven Central 
Repository](https://search.maven.org/search?q=org.apache.logging.log4j)
 
-#set($Log4jReleaseVersionJava7 = '2.12.4')
 $h3 Java 7 Release ${Log4jReleaseVersionJava7}
 
 | Distribution                   | Mirrors                                     
                    | Checksum                                                  
      | Signature                                                               
            |
@@ -96,7 +97,6 @@ $h3 Java 7 Release ${Log4jReleaseVersionJava7}
 [srczipsha512J7]: 
https://www.apache.org/dist/logging/log4j/${Log4jReleaseVersionJava7}/apache-log4j-${Log4jReleaseVersionJava7}-src.zip.sha512
 [srczipascJ7]: 
https://www.apache.org/dist/logging/log4j/${Log4jReleaseVersionJava7}/apache-log4j-${Log4jReleaseVersionJava7}-src.zip.asc
 
-#set($Log4jReleaseVersionJava6 = '2.3.2')
 $h3 Java 6 Release ${Log4jReleaseVersionJava6}
 
 | Distribution                   | Mirrors                                     
                    | Checksum                                                  
      | Signature                                                               
            |
diff --git a/src/site/markdown/maven-artifacts.md.vm 
b/src/site/markdown/maven-artifacts.md.vm
index 8718ce44a7..50d640da1d 100644
--- a/src/site/markdown/maven-artifacts.md.vm
+++ b/src/site/markdown/maven-artifacts.md.vm
@@ -278,33 +278,6 @@ a Reader be wiretapped by a Logger. To use IO Streams, add 
the following.
 
 #dependencies(['log4j-iostreams'])
 
-$h3 Scala API
-
-A convenient Scala wrapper for the Logger API. SBT users can add the following 
to their
-`build.sbt`:
-
-#sbtVersion(['log4j-api-scala'], '11.0')
-
-Maven, Ivy, and Gradle users need to add the Scala version to the artifact 
name.
-
-Scala 2.12 users can use the following:
-
-#mavenVersion(['log4j-api-scala_2.12'], '11.0')
-#ivyVersion(['log4j-api-scala_2.12'], '11.0')
-#gradleVersion(['log4j-api-scala_2.12'], '11.0')
-
-Scala 2.11 users can use the following:
-
-#mavenVersion(['log4j-api-scala_2.11'], '11.0')
-#ivyVersion(['log4j-api-scala_2.11'], '11.0')
-#gradleVersion(['log4j-api-scala_2.11'], '11.0')
-
-Scala 2.10 users can use the following:
-
-#mavenVersion(['log4j-api-scala_2.10'], '11.0')
-#ivyVersion(['log4j-api-scala_2.10'], '11.0')
-#gradleVersion(['log4j-api-scala_2.10'], '11.0')
-
 $h2 Snapshot builds
 
 You can access the latest development snapshot by using the Maven repository
diff --git a/src/site/resources/manual/scala-api.html 
b/src/site/resources/manual/scala-api.html
new file mode 100644
index 0000000000..70afbf5a2a
--- /dev/null
+++ b/src/site/resources/manual/scala-api.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<html lang="en">
+<head>
+    <title>Apache Log4j Scala API</title>
+    <!-- Log4j 2.21.0 removed the `/manual/scala-api.html` in favor of 
project's own website.
+         We have this HTML-based redirect here to continue support these old 
URLs. -->
+    <meta http-equiv="refresh" content="0; 
url=https://logging.apache.org/log4j/scala"/>
+</head>
+<body>
+<p>You will be redirected to <a 
href="https://logging.apache.org/log4j/scala";>the project website</a>.</p>
+</body>
+</html>
diff --git a/src/site/site.xml b/src/site/site.xml
index 0bb71bd167..9097061c5e 100644
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@ -96,7 +96,8 @@
         <item name="ThreadContext" href="/manual/thread-context.html"/>
       </item>
 
-      <item name="Scala API" href="/manual/scala-api.html"/>
+      <item name="Kotlin API" href="https://logging.apache.org/log4j/kotlin"/>
+      <item name="Scala API" href="https://logging.apache.org/log4j/scala"/>
 
       <item name="Configuration" href="/manual/configuration.html" 
collapse="true">
         <item name="Configuration Architecture" 
href="/manual/configuration.html#Architecture"/>
diff --git a/src/site/xdoc/manual/scala-api.xml 
b/src/site/xdoc/manual/scala-api.xml
deleted file mode 100644
index 34178420b3..0000000000
--- a/src/site/xdoc/manual/scala-api.xml
+++ /dev/null
@@ -1,93 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one or more
-  ~ contributor license agreements.  See the NOTICE file distributed with
-  ~ this work for additional information regarding copyright ownership.
-  ~ The ASF licenses this file to you under the Apache License, Version 2.0
-  ~ (the "License"); you may not use this file except in compliance with
-  ~ the License.  You may obtain a copy of the License at
-  ~
-  ~      http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-<document xmlns="http://maven.apache.org/XDOC/2.0";
-          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-          xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 
http://maven.apache.org/xsd/xdoc-2.0.xsd";>
-    <properties>
-        <title>Log4j 2 Scala API</title>
-        <author email="[email protected]">Mikael Ståldal</author>
-    </properties>
-
-    <body>
-        <section name="Log4j 2 API">
-            <a name="ScalaAPI"/>
-            <subsection name="Scala API">
-                <p>
-                    Log4j 2 has a companion Log4j Scala project that contains 
a convenient Scala wrapper for the
-                    <a class="javadoc" 
href="../log4j-api/apidocs/org/apache/logging/log4j/Logger.html">Logger</a>
-                    API.
-                </p>
-
-                <h4>Requirements</h4>
-                <p>
-                    Log4j 2 Scala API is dependent on the Log4j 2 API, Scala 
runtime library and reflection.
-                    It currently supports Scala 2.10, 2.11, 2.12, 2.13. Scala 
3 support has been recently added.
-                    See <a 
href="../maven-artifacts.html#Scala_API">instructions</a>
-                    on including this in an SBT, Maven, Ivy, or Gradle project.
-                </p>
-
-                <h4>Example</h4>
-                <pre class="prettyprint linenums">
-import org.apache.logging.log4j.scala.Logging
-import org.apache.logging.log4j.Level
-
-class MyClass extends BaseClass with Logging {
-  def doStuff(): Unit = {
-    logger.info("Doing stuff")
-  }
-  def doStuffWithLevel(level: Level): Unit = {
-    logger(level, "Doing stuff with arbitrary level")
-  }
-}
-                </pre>
-                <p>
-                    The output from the call to logger.info() will vary 
significantly depending on the configuration
-                    used. See the
-                    <a href="./configuration.html">Configuration</a>
-                    section for more details.
-                </p>
-                <h4>Substituting Parameters</h4>
-                <p>
-                    Frequently the purpose of logging is to provide 
information about what is happening in the system,
-                    which requires including information about the objects 
being manipulated. In Scala, you can use
-                    <a 
href="https://docs.scala-lang.org/overviews/core/string-interpolation.html";>string
 interpolation
-                    </a>
-                    to achieve this:
-                </p>
-                <pre class="prettyprint">
-logger.debug(s"Logging in user ${user.getName} with birthday 
${user.calcBirthday}")
-                </pre>
-                <p>
-                    Since the Scala Logger is implemented with macros, the 
String construction and method invocations
-                    will only occur when debug logging is enabled.
-                </p>
-
-                <h4>Logger Names</h4>
-                <p>
-                    Most logging implementations use a hierarchical scheme for 
matching logger names with logging
-                    configuration. In this scheme the logger name hierarchy is 
represented by '.' characters in the
-                    logger name, in a fashion very similar to the hierarchy 
used for Java/Scala package names.
-                    The Logging trait will automatically name the Logger 
accordingly to the class it is being used in.
-                </p>
-
-              <p>Please see the <a 
href="https://logging.apache.org/log4j/scala/index.html";>Log4j Scala</a> 
project for more details.</p>
-
-            </subsection>
-        </section>
-    </body>
-</document>
diff --git a/src/site/xdoc/runtime-dependencies.xml 
b/src/site/xdoc/runtime-dependencies.xml
index eb2ac5c6a4..243b35840c 100644
--- a/src/site/xdoc/runtime-dependencies.xml
+++ b/src/site/xdoc/runtime-dependencies.xml
@@ -422,13 +422,6 @@
         This only requires the Log4j API.
       </p>
 
-      <a name="log4j-api-scala" />
-      <h4>log4j-api-scala</h4>
-      <p>
-        The Log4j <a href="manual/scala-api.html">Scala API</a> requires Scala 
runtime library and reflection in
-        addition to the Log4j API.
-      </p>
-
       <a name="log4j-jakarta-smtp" />
       <h4>log4j-jakarta-smtp</h4>
       <p>

Reply via email to