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

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


The following commit(s) were added to refs/heads/release-2.x by this push:
     new aa1cefdff5 Update that `release-2.x` and `master` branches have been 
renamed to `2.x` and `main`, respectively
aa1cefdff5 is described below

commit aa1cefdff5b9778c95a382b807f3985946b769d2
Author: Volkan Yazıcı <vol...@yazi.ci>
AuthorDate: Mon Feb 27 11:35:35 2023 +0100

    Update that `release-2.x` and `master` branches have been renamed to `2.x` 
and `main`, respectively
---
 .asf.yaml                                          |   4 +-
 .github/pull_request_template.md                   |   1 +
 .github/workflows/benchmark.yml                    | 247 ---------------------
 .github/workflows/build.yml                        |   4 +-
 .github/workflows/codeql-analysis.yml              |   7 +-
 .github/workflows/log4j-kafka-test.yml             |   4 +-
 .github/workflows/scorecards-analysis.yml          |   2 +-
 CONTRIBUTING.md                                    |   2 +-
 .../asciidoc/manual/json-template-layout.adoc.vm   |  10 +-
 src/site/markdown/log4j-docker.md.vm               |   2 +-
 src/site/markdown/manual/cloud.md                  |   2 +-
 src/site/markdown/maven-artifacts.md.vm            |   6 +-
 12 files changed, 22 insertions(+), 269 deletions(-)

diff --git a/.asf.yaml b/.asf.yaml
index 069f46d492..52e12b4f97 100644
--- a/.asf.yaml
+++ b/.asf.yaml
@@ -42,8 +42,8 @@ github:
     - api
     - syslog
   protected_branches:
-    master: {}
-    release-2.x: {}
+    main: {}
+    2.x: {}
   # Attempt to make the auto-generated github emails more easily readable in 
email clients.
   custom_subjects:
     new_pr: "[PR] {title} ({repository})"
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
index 7b0db3918c..15cb841567 100644
--- a/.github/pull_request_template.md
+++ b/.github/pull_request_template.md
@@ -2,6 +2,7 @@
 
 ## Checklist
 
+* Base your changes on `2.x` branch if you are targeting Log4j 2; use `main` 
otherwise
 * `./mvnw verify` succeeds (if it fails due to code formatting issues reported 
by Spotless, simply run `spotless:apply` and retry)
 * Changes contain an entry file in the `src/changelog/.2.x.x` directory
 * Tests for the changes are provided
diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml
deleted file mode 100644
index ad5e4cb2cc..0000000000
--- a/.github/workflows/benchmark.yml
+++ /dev/null
@@ -1,247 +0,0 @@
-# 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.
-
-name: benchmark
-
-on: [ workflow_dispatch ]
-
-jobs:
-
-  build:
-
-    if: github.repository == 'apache/logging-log4j2'
-
-    runs-on: ubuntu-latest
-
-    steps:
-
-      - name: Checkout repository
-        uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b   # 
3.2.0
-
-      # JDK 11 is needed for the build.
-      # Search `maven-toolchains-plugin` usages for details.
-      - name: Set up JDK 11
-        uses: actions/setup-java@1df8dbefe2a8cbc99770194893dd902763bee34b   # 
3.9.0
-        with:
-          distribution: temurin
-          java-version: 11
-          java-package: jdk
-          architecture: x64
-          cache: maven
-
-      # JDK 8 is needed for the build, and it is the primary bytecode target.
-      # Hence, JDK 8 is set up after 11, so that JAVA_HOME used by Maven 
during build will point to 8.
-      - name: Set up JDK 8
-        uses: actions/setup-java@1df8dbefe2a8cbc99770194893dd902763bee34b   # 
3.9.0
-        with:
-          distribution: temurin
-          java-version: 8
-          java-package: jdk
-          architecture: x64
-          cache: maven
-
-      - name: Build with Maven
-        shell: bash
-        run: |
-          ./mvnw \
-            --show-version --batch-mode --errors --no-transfer-progress \
-            --global-toolchains .github/workflows/maven-toolchains.xml \
-            -DskipTests=true \
-            --projects log4j-perf \
-            --also-make \
-            package
-
-      - name: Upload built sources
-        uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb 
   # 3.1.0
-        with:
-          name: benchmarks.jar
-          path: log4j-perf/target/benchmarks.jar
-
-  run:
-
-    needs: build
-
-    runs-on: ${{ matrix.os }}
-
-    strategy:
-      matrix:
-        os: [ macos-latest, ubuntu-latest, windows-latest ]
-        jdk: [ 11, 17 ]
-        concurrency: [ 1, 8 ]
-        jmhCommand:
-          - "-t $CONCURRENCY -f 3 -wi 3 -w 10s -i 4 -r 20s -prof gc -prof 
perfnorm -rf json -rff results-layout-jtl.json 
'.*JsonTemplateLayoutBenchmark.*Jtl4EcsLayout'"
-          - "-t $CONCURRENCY -f 3 -wi 3 -w 10s -i 4 -r 20s -prof gc -prof 
perfnorm -rf json -rff results-util-instant-format.json 
'.*InstantFormatBenchmark.*'"
-
-    steps:
-
-      - name: Checkout repository
-        uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b   # 
3.2.0
-
-      - name: Download built sources
-        uses: 
actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741    # 3.0.0
-        with:
-          name: benchmarks.jar
-          path: log4j-perf/target
-
-      - name: Set up JDK ${{ matrix.jdk }}
-        uses: actions/setup-java@1df8dbefe2a8cbc99770194893dd902763bee34b   # 
3.9.0
-        with:
-          distribution: temurin
-          java-version: ${{ matrix.jdk }}
-          java-package: jdk
-          architecture: x64
-          cache: maven
-
-      - name: Run benchmarks
-        timeout-minutes: 120
-        shell: bash
-        run: |
-          export CONCURRENCY=${{ matrix.concurrency }}
-          java \
-            -jar log4j-perf/target/benchmarks.jar \
-            ${{ matrix.jmhCommand }}
-
-      - name: Stage benchmark results for commit
-        shell: bash
-        run: |
-
-          # Determine the artifact version.
-          set -x
-          ./mvnw \
-            --batch-mode --quiet \
-            -DforceStdout=true \
-            -Dexpression=project.version \
-            help:evaluate \
-            | tee mvnw-project-version.out
-          echo
-
-          # Determine certain file path properties.
-          export REVISION=$(<mvnw-project-version.out)
-          export BRANCH_NAME=$(echo "$GITHUB_REF" | sed 's/refs\/heads\///g')
-          export INSTANT=$(date -u +%Y%m%d)
-          export OS_NAME=$(echo "${{ matrix.os }}" | sed 's/-latest//g')
-          export RUN_ID=$(printf "%020d" "$GITHUB_RUN_ID")
-
-          # Move and stage the result files.
-          for SRC_FILEPATH in results-*.json; do
-            export BENCHMARK_NAME=$(basename "$SRC_FILEPATH" | sed 
's/^results-//g' | sed 's/\.json$//g')
-            export 
DST_FILEPATH="benchmark/results/$REVISION/$BRANCH_NAME-$INSTANT-$RUN_ID/$BENCHMARK_NAME-O$OS_NAME-J${{
 matrix.jdk }}-C${{ matrix.concurrency }}.json"
-            mkdir -v -p $(dirname "$DST_FILEPATH")
-            mv -v "$SRC_FILEPATH" "$DST_FILEPATH"
-            git add "$DST_FILEPATH"
-          done
-
-          # Stash changes for commit.
-          git stash save
-          git clean -f
-
-      - name: Commit benchmark results
-        timeout-minutes: 1
-        shell: bash
-        run: |
-
-          # Checkout the results branch.
-          set -x
-          git fetch origin gh-pages
-          git checkout -B gh-pages origin/gh-pages
-
-          # Stage the stashed changes.
-          # (`show + apply` is preferred over `pop`, since the latter fails if 
file already exists.)
-          git stash show -p | git apply
-          git add benchmark/results
-          git status --porcelain
-          test $(git status --porcelain | wc -l) -gt 0 || exit 0
-
-          # Commit changes.
-          git config user.name github-actions
-          git config user.email github-acti...@github.com
-          git commit -a -m "Add benchmark results for ${{ runner.os }}, JDK 
${{ matrix.jdk }}, and concurrency ${{ matrix.concurrency }}."
-
-          # Push changes in a loop to allow concurrent repository 
modifications.
-          export RETRY=0
-          while [ 1 ]; do
-            set +e
-            git push origin gh-pages 2>&1 | tee git-push.out
-            if [ $? -eq 0 ]; then
-              exit 0
-            else
-              set -e
-              let RETRY+=1
-              echo "retry #$RETRY"
-              git pull -r origin gh-pages
-            fi
-          done
-
-  index:
-
-    runs-on: ubuntu-latest
-    needs: run
-
-    steps:
-
-      - name: Checkout repository
-        uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b   # 
3.2.0
-        with:
-          ref: gh-pages
-
-      - name: Setup Python 3
-        uses: actions/setup-python@13ae5bb136fac2878aff31522b9efb785519f984   
# 4.3.0
-        with:
-          python-version: 3.x
-
-      - name: Index benchmark results
-        timeout-minutes: 1
-        shell: bash
-        run: |
-
-          # Configure the git user.
-          git config user.name github-actions
-          git config user.email github-acti...@github.com
-
-          # Push changes in a loop to allow concurrent repository 
modifications.
-          export RETRY=0
-          export INDEX_FILEPATH=benchmark/results/index.json
-          while [ 1 ]; do
-
-            # Generate the index file.
-            python -c '\
-              import json, os, re;\
-              filepaths=[re.sub("^benchmark/results/", "", 
os.path.join(root,filename)) \
-                  for (root, dirs, filenames) in os.walk("benchmark/results") \
-                      for filename in filenames]; \
-              filepaths.remove("index.json"); \
-              print(json.dumps(filepaths))' \
-            >"$INDEX_FILEPATH"
-
-            # Exit if there are no changes, that is, a concurrent job has 
indexed all results.
-            git diff --exit-code "$INDEX_FILEPATH" && exit 0
-
-            # Commit the index file.
-            git add "$INDEX_FILEPATH"
-            git commit "$INDEX_FILEPATH" -m "Update benchmark results index."
-
-            # Push the index file.
-            set +e
-            git push origin gh-pages 2>&1 | tee git-push.out
-            if [ $? -eq 0 ]; then
-              exit 0
-            else
-              set -e
-              let RETRY+=1
-              echo "retry #$RETRY"
-              git pull -r origin gh-pages
-            fi
-
-          done
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index e24796021c..3fe236b57a 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -18,7 +18,7 @@ name: build
 on:
   push:
     branches:
-      - release-2.x
+      - 2.x
   pull_request:
 
 permissions: read-all
@@ -130,7 +130,7 @@ jobs:
     env:
       MAVEN_OPTS: -Xms3072m -Xmx3072m
     needs: build
-    if: github.repository == 'apache/logging-log4j2' && github.ref == 
'refs/heads/release-2.x'
+    if: github.repository == 'apache/logging-log4j2' && github.ref == 
'refs/heads/2.x'
 
     steps:
 
diff --git a/.github/workflows/codeql-analysis.yml 
b/.github/workflows/codeql-analysis.yml
index 0f3ad74a45..a5ff9e0d74 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -17,11 +17,10 @@ name: "CodeQL"
 
 on:
   push:
-    branches: [ release-2.x ]
-    # TODO: add master branch if build can be more generic
+    branches: [ 2.x ]
   pull_request:
-    # The branches below must be a subset of the branches above
-    branches: [ release-2.x ]
+    # The branches below must be a subset of the branches provided in 
`on.push.branches`
+    branches: [ 2.x ]
   schedule:
     - cron: '32 12 * * 5'
 
diff --git a/.github/workflows/log4j-kafka-test.yml 
b/.github/workflows/log4j-kafka-test.yml
index 3d9b477f90..8b734c8254 100644
--- a/.github/workflows/log4j-kafka-test.yml
+++ b/.github/workflows/log4j-kafka-test.yml
@@ -14,7 +14,8 @@
 # limitations under the license.
 
 name: log4j-kafka tests
-on: [workflow_dispatch]
+
+on: [ workflow_dispatch ]
 
 permissions: read-all
 
@@ -56,4 +57,3 @@ jobs:
             -Dkafka.version=${{ matrix.version }} \
             -pl log4j-core-test -Dtest=Kafka*Test \
             test
-
diff --git a/.github/workflows/scorecards-analysis.yml 
b/.github/workflows/scorecards-analysis.yml
index 131c01e713..b329364734 100644
--- a/.github/workflows/scorecards-analysis.yml
+++ b/.github/workflows/scorecards-analysis.yml
@@ -20,7 +20,7 @@ on:
   schedule:
     - cron: "30 1 * * 6"    # Weekly on Saturdays
   push:
-    branches: [ "release-2.x", "master" ]
+    branches: [ "2.x", "main" ]
 
 permissions: read-all
 
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 0ac106eba9..e3475ea5e2 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -35,7 +35,7 @@ follow so that we can have a chance of keeping on top of 
things.
 
 ## Making Changes
 
-+ Create a topic branch from where you want to base your work (this is usually 
the master branch).
++ Create a topic branch from where you want to base your work (this is usually 
the `2.x` branch).
 + Make commits of logical units.
 + Respect the original code style:
   + Only use spaces for indentation.
diff --git a/src/site/asciidoc/manual/json-template-layout.adoc.vm 
b/src/site/asciidoc/manual/json-template-layout.adoc.vm
index 2fbce39a54..d6c503385c 100644
--- a/src/site/asciidoc/manual/json-template-layout.adoc.vm
+++ b/src/site/asciidoc/manual/json-template-layout.adoc.vm
@@ -395,14 +395,14 @@ serialize ``LogEvent``s. The default configuration 
(accessible by
 `classpath:EcsLayout.json` provided by the `log4j-layout-template-json`
 artifact, which contains the following predefined event templates:
 
-- 
https://github.com/apache/logging-log4j2/tree/master/log4j-layout-template-json/src/main/resources/EcsLayout.json[`EcsLayout.json`]
+- 
https://github.com/apache/logging-log4j2/tree/main/log4j-layout-template-json/src/main/resources/EcsLayout.json[`EcsLayout.json`]
   described by 
https://www.elastic.co/guide/en/ecs/current/ecs-reference.html[the Elastic 
Common Schema (ECS) specification]
 
-- 
https://github.com/apache/logging-log4j2/tree/master/log4j-layout-template-json/src/main/resources/LogstashJsonEventLayoutV1.json[`LogstashJsonEventLayoutV1.json`]
+- 
https://github.com/apache/logging-log4j2/tree/main/log4j-layout-template-json/src/main/resources/LogstashJsonEventLayoutV1.json[`LogstashJsonEventLayoutV1.json`]
   described in https://github.com/logstash/log4j-jsonevent-layout[Logstash
   `json_event` pattern for log4j]
 
-- 
https://github.com/apache/logging-log4j2/tree/master/log4j-layout-template-json/src/main/resources/GelfLayout.json[`GelfLayout.json`]
+- 
https://github.com/apache/logging-log4j2/tree/main/log4j-layout-template-json/src/main/resources/GelfLayout.json[`GelfLayout.json`]
   described by 
https://docs.graylog.org/en/3.1/pages/gelf.html#gelf-payload-specification[the
   Graylog Extended Log Format (GELF) payload specification] with additional
   `_thread` and `_logger` fields. (Here it is advised to override the 
obligatory
@@ -410,7 +410,7 @@ artifact, which contains the following predefined event 
templates:
   xref:additional-event-template-fields[additional event template fields]
   to avoid `hostName` property lookup at runtime, which incurs an extra cost.)
 
-- 
https://github.com/apache/logging-log4j2/tree/master/log4j-layout-template-json/src/main/resources/GcpLayout.json[`GcpLayout.json`]
+- 
https://github.com/apache/logging-log4j2/tree/main/log4j-layout-template-json/src/main/resources/GcpLayout.json[`GcpLayout.json`]
   described by https://cloud.google.com/logging/docs/structured-logging[Google
   Cloud Platform structured logging] with additional
   `_thread`, `_logger` and `_exception` fields. The exception trace, if any,
@@ -419,7 +419,7 @@ artifact, which contains the following predefined event 
templates:
   information, while the latter is Google's expected place for the exception,
   and integrates with https://cloud.google.com/error-reporting[Google Error 
Reporting].
 
-- 
https://github.com/apache/logging-log4j2/tree/master/log4j-layout-template-json/src/main/resources/JsonLayout.json[`JsonLayout.json`]
+- 
https://github.com/apache/logging-log4j2/tree/main/log4j-layout-template-json/src/main/resources/JsonLayout.json[`JsonLayout.json`]
   providing the exact JSON structure generated by 
link:layouts.html#JSONLayout[`JsonLayout`]
   with the exception of `thrown` field. (`JsonLayout` serializes the 
`Throwable`
   as is via Jackson `ObjectMapper`, whereas `JsonLayout.json` template of
diff --git a/src/site/markdown/log4j-docker.md.vm 
b/src/site/markdown/log4j-docker.md.vm
index 6ce02e5db7..4853bd5c5b 100644
--- a/src/site/markdown/log4j-docker.md.vm
+++ b/src/site/markdown/log4j-docker.md.vm
@@ -28,7 +28,7 @@ $h2 Accessing Docker
 The Log4j Docker support requires access to the Docker REST interface. In 
practical terms this means the
 application either needs access to unix:///var/run/docker.sock through a 
volume mount (not recommended),
 bind Docker to another host/port or unix socket. or use a proxy application to 
provide access. The
-[Log4j Spring Cloud sample 
application](https://github.com/apache/logging-log4j2/tree/master/log4j-spring-cloud-config/log4j-spring-cloud-config-samples/log4j-spring-cloud-config-sample-application)
+[Log4j Spring Cloud sample 
application](https://github.com/apache/logging-log4j2/tree/main/log4j-spring-cloud-config/log4j-spring-cloud-config-samples/log4j-spring-cloud-config-sample-application)
 uses a socat proxy to access Docker.
 
 $h2 Lookup Attributes
diff --git a/src/site/markdown/manual/cloud.md 
b/src/site/markdown/manual/cloud.md
index 3294387de0..595eec9964 100644
--- a/src/site/markdown/manual/cloud.md
+++ b/src/site/markdown/manual/cloud.md
@@ -35,7 +35,7 @@ Solutions for this are to:
 to the operating system so that the output can be piped into a file. The 
overhead of all this is measurably slower
 than just writing directly to a file as can be seen in these benchmark results 
where logging 
 to stdout is 16-20 times slower over repeated runs than logging directly to 
the file. The results below were obtained by 
-running the [Output 
Benchmark](https://github.com/apache/logging-log4j2/blob/release-2.x/log4j-perf/src/main/java/org/apache/logging/log4j/perf/jmh/OutputBenchmark.java)
+running the [Output 
Benchmark](https://github.com/apache/logging-log4j2/blob/2.x/log4j-perf/src/main/java/org/apache/logging/log4j/perf/jmh/OutputBenchmark.java)
 on a 2018 MacBook Pro with a 2.9GHz Intel Core i9 processor and a 1TB SSD.  
However, these results alone would not be 
 enough to argue against writing to the standard output stream as they only 
amount to about 14-25 microseconds 
 per logging call vs 1.5 microseconds when writing to the file. 
diff --git a/src/site/markdown/maven-artifacts.md.vm 
b/src/site/markdown/maven-artifacts.md.vm
index 055f68d425..8718ce44a7 100644
--- a/src/site/markdown/maven-artifacts.md.vm
+++ b/src/site/markdown/maven-artifacts.md.vm
@@ -309,10 +309,10 @@ $h2 Snapshot builds
 
 You can access the latest development snapshot by using the Maven repository
 `https://repository.apache.org/snapshots` and the current SNAPSHOT version.
-Generally, the master branch will use the next patch version as its snapshot
+Generally, the `main` branch will use the next patch version as its snapshot
 version regardless of what the next actual version of Log4j will be. For 
example,
-if the latest release were `2.0`, then master would be using the version
-`2.0.1-SNAPSHOT`. Always verify with `pom.xml` in the master branch as 
described
+if the latest release were `2.0`, then `main` would be using the version
+`2.0.1-SNAPSHOT`. Always verify with `pom.xml` in the `main` branch as 
described
 in the [source repository page](source-repository.html).
 
 $h3 Maven

Reply via email to