Skip to content

Commit 5aabe1b

Browse files
committed
Merge branch '2.25.x' into 2.x-site-pro
# Conflicts: # .asf.yaml
2 parents 672eaf5 + bdd1024 commit 5aabe1b

207 files changed

Lines changed: 5537 additions & 1721 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,4 @@ name: Feature request
33
about: Submit a feature request
44
---
55

6-
**Warning!**
7-
It is highly recommended to discuss feature requests in [the mailing lists](https://logging.apache.org/log4j/2.x/support.html) first.
8-
96
[A clear and concise description of the feature requested.]

.github/dependabot.yaml

Lines changed: 34 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -44,48 +44,17 @@ registries:
4444
updates:
4545

4646
- package-ecosystem: maven
47-
directories:
48-
- "/log4j-1.2-api"
49-
- "/log4j-api-test"
50-
- "/log4j-api"
51-
- "/log4j-appserver"
52-
- "/log4j-cassandra"
53-
- "/log4j-core-fuzz-test"
54-
- "/log4j-core-its"
55-
- "/log4j-core-test"
56-
- "/log4j-core"
57-
- "/log4j-couchdb"
58-
- "/log4j-docker"
59-
- "/log4j-fuzz-test"
60-
- "/log4j-iostreams"
61-
- "/log4j-jakarta-jms"
62-
- "/log4j-jakarta-smtp"
63-
- "/log4j-jakarta-web"
64-
- "/log4j-jcl"
65-
- "/log4j-jdbc-dbcp2"
66-
- "/log4j-jpa"
67-
- "/log4j-jpl"
68-
- "/log4j-jul"
69-
- "/log4j-layout-template-json-fuzz-test"
70-
- "/log4j-layout-template-json-test"
71-
- "/log4j-layout-template-json"
72-
- "/log4j-mongodb"
73-
# `log4j-mongodb4` is in a separate run
74-
- "/log4j-osgi-test"
75-
- "/log4j-parent"
76-
- "/log4j-perf-test"
77-
# `log4j-slf4j-impl` is in a separate run
78-
- "/log4j-slf4j2-impl-fuzz-test"
79-
- "/log4j-slf4j2-impl"
80-
- "/log4j-spring-boot"
81-
- "/log4j-spring-cloud-config-client"
82-
- "/log4j-taglib"
83-
- "/log4j-to-jul"
84-
- "/log4j-to-slf4j"
85-
- "/log4j-web"
86-
open-pull-requests-limit: 10
47+
directory: "/"
48+
exclude-paths:
49+
# These use versions of MongoDB and SLF4J different
50+
# from the remaining artifacts
51+
- "log4j-mongodb4/**"
52+
- "log4j-slf4j-impl/**"
8753
schedule:
88-
interval: "daily"
54+
interval: "monthly"
55+
groups:
56+
dependencies:
57+
patterns: [ "*" ]
8958
target-branch: "2.x"
9059
registries:
9160
- maven-central
@@ -166,9 +135,11 @@ updates:
166135
- package-ecosystem: maven
167136
directories:
168137
- "/log4j-mongodb4"
169-
open-pull-requests-limit: 10
170138
schedule:
171-
interval: "daily"
139+
interval: "monthly"
140+
groups:
141+
dependencies:
142+
patterns: [ "*" ]
172143
target-branch: "2.x"
173144
registries:
174145
- maven-central
@@ -180,20 +151,19 @@ updates:
180151
- package-ecosystem: github-actions
181152
directory: "/"
182153
schedule:
183-
interval: "daily"
184-
target-branch: "2.x"
185-
186-
- package-ecosystem: npm
187-
directory: "/"
188-
schedule:
189-
interval: "daily"
154+
interval: "monthly"
155+
groups:
156+
dependencies:
157+
patterns: [ "*" ]
190158
target-branch: "2.x"
191159

192160
- package-ecosystem: maven
193161
directory: "/"
194-
open-pull-requests-limit: 10
195162
schedule:
196-
interval: "daily"
163+
interval: "monthly"
164+
groups:
165+
dependencies:
166+
patterns: [ "*" ]
197167
target-branch: "main"
198168
registries:
199169
- maven-central
@@ -222,9 +192,11 @@ updates:
222192
- package-ecosystem: maven
223193
directories:
224194
- "/log4j-slf4j-impl"
225-
open-pull-requests-limit: 10
226195
schedule:
227-
interval: "daily"
196+
interval: "monthly"
197+
groups:
198+
dependencies:
199+
patterns: [ "*" ]
228200
target-branch: "main"
229201
registries:
230202
- maven-central
@@ -236,11 +208,17 @@ updates:
236208
- package-ecosystem: github-actions
237209
directory: "/"
238210
schedule:
239-
interval: "daily"
211+
interval: "monthly"
212+
groups:
213+
dependencies:
214+
patterns: [ "*" ]
240215
target-branch: "main"
241216

242217
- package-ecosystem: npm
243218
directory: "/"
244219
schedule:
245-
interval: "daily"
220+
interval: "monthly"
221+
groups:
222+
dependencies:
223+
patterns: [ "*" ]
246224
target-branch: "main"

.github/pull_request_template.md

Lines changed: 4 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,8 @@
11
**INSERT HERE** a clear and concise description of what the pull request is for along with a reference to the associated issue IDs, if they exist.
22

3-
> [!IMPORTANT]
4-
> Base your changes on `2.x` branch if you are targeting Log4j 2; use `main` otherwise.
5-
63
## Checklist
74

8-
Before we can review and merge your changes, please go through the checklist below. If you're still working on some items, feel free to submit your pull request as a draft—our CI will help guide you through the remaining steps.
9-
10-
### ✅ Required checks
11-
12-
- [ ] **License**: I confirm that my changes are submitted under the [Apache License, Version 2.0](https://apache.org/licenses/LICENSE-2.0).
13-
- [ ] **Commit signatures**: All commits are signed and verifiable. (See [GitHub Docs on Commit Signature Verification](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification)).
14-
- [ ] **Code formatting**: The code is formatted according to the project’s style guide.
15-
<details>
16-
<summary>How to check and fix formatting</summary>
17-
18-
- To **check** formatting: `./mvnw spotless:check`
19-
- To **fix** formatting: `./mvnw spotless:apply`
20-
21-
See [the build instructions](https://logging.apache.org/log4j/2.x/development.html#building) for details.
22-
</details>
23-
- [ ] **Build & Test**: I verified that the project builds and all unit tests pass.
24-
<details>
25-
<summary>How to build the project</summary>
26-
27-
Run: `./mvnw verify`
28-
29-
See [the build instructions](https://logging.apache.org/log4j/2.x/development.html#building) for details.
30-
</details>
31-
32-
### 🧪 Tests (select one)
33-
34-
- [ ] I have added or updated tests to cover my changes.
35-
- [ ] No additional tests are needed for this change.
36-
37-
### 📝 Changelog (select one)
38-
39-
- [ ] I added a changelog entry in `src/changelog/.2.x.x`. (See [Changelog Entry File Guide](https://logging.apache.org/log4j/tools/log4j-changelog.html#changelog-entry-file)).
40-
- [ ] This is a trivial change and does not require a changelog entry.
5+
* Base your changes on `2.x` branch if you are targeting Log4j 2; use `main` otherwise
6+
* `./mvnw verify` succeeds ([the build instructions](https://logging.apache.org/log4j/2.x/development.html#building))
7+
* Non-trivial changes contain an entry file in the `src/changelog/.2.x.x` directory
8+
* Tests are provided

.github/workflows/build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ on:
2121
push:
2222
branches:
2323
- "2.x"
24+
- "2.25.x"
2425
- "release/2*"
2526
pull_request:
2627

@@ -29,7 +30,6 @@ permissions: read-all
2930
jobs:
3031

3132
build:
32-
if: github.actor != 'dependabot[bot]'
3333
uses: apache/logging-parent/.github/workflows/build-reusable.yaml@rel/12.1.1
3434
secrets:
3535
DV_ACCESS_TOKEN: ${{ startsWith(github.ref_name, 'release/') && '' || secrets.DEVELOCITY_ACCESS_KEY }}

.github/workflows/merge-dependabot.yaml

Lines changed: 0 additions & 52 deletions
This file was deleted.

log4j-1.2-api/src/main/java/org/apache/log4j/builders/appender/DailyRollingFileAppenderBuilder.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -180,25 +180,25 @@ private <T extends Log4j1Configuration> Appender createAppender(
180180
}
181181
final String filePattern = fileName + "%d{" + datePattern + "}";
182182
final TriggeringPolicy timePolicy =
183-
TimeBasedTriggeringPolicy.newBuilder().withModulate(true).build();
183+
TimeBasedTriggeringPolicy.newBuilder().setModulate(true).build();
184184
final TriggeringPolicy policy = CompositeTriggeringPolicy.createPolicy(timePolicy);
185185
final RolloverStrategy strategy = DefaultRolloverStrategy.newBuilder()
186-
.withConfig(configuration)
187-
.withMax(Integer.toString(Integer.MAX_VALUE))
186+
.setConfig(configuration)
187+
.setMax(Integer.toString(Integer.MAX_VALUE))
188188
.build();
189189
return AppenderWrapper.adapt(RollingFileAppender.newBuilder()
190190
.setName(name)
191191
.setConfiguration(configuration)
192192
.setLayout(fileLayout)
193193
.setFilter(fileFilter)
194-
.withFileName(fileName)
195-
.withAppend(append)
194+
.setFileName(fileName)
195+
.setAppend(append)
196196
.setBufferedIo(bufferedIo)
197197
.setBufferSize(bufferSize)
198198
.setImmediateFlush(immediateFlush)
199-
.withFilePattern(filePattern)
200-
.withPolicy(policy)
201-
.withStrategy(strategy)
199+
.setFilePattern(filePattern)
200+
.setPolicy(policy)
201+
.setStrategy(strategy)
202202
.build());
203203
}
204204
}

log4j-1.2-api/src/main/java/org/apache/log4j/builders/appender/EnhancedRollingFileAppenderBuilder.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ private Appender createAppender(
259259
final DefaultRolloverStrategy.Builder rolloverStrategyBuilder = DefaultRolloverStrategy.newBuilder();
260260
switch (rollingPolicyClassName) {
261261
case FIXED_WINDOW_ROLLING_POLICY:
262-
rolloverStrategyBuilder.withMin(Integer.toString(minIndex)).withMax(Integer.toString(maxIndex));
262+
rolloverStrategyBuilder.setMin(Integer.toString(minIndex)).setMax(Integer.toString(maxIndex));
263263
break;
264264
case TIME_BASED_ROLLING_POLICY:
265265
break;
@@ -276,18 +276,18 @@ private Appender createAppender(
276276
return null;
277277
}
278278
return AppenderWrapper.adapt(RollingFileAppender.newBuilder()
279-
.withAppend(append)
279+
.setAppend(append)
280280
.setBufferedIo(bufferedIo)
281281
.setBufferSize(bufferedIo ? bufferSize : 0)
282282
.setConfiguration(configuration)
283-
.withFileName(actualFileName)
284-
.withFilePattern(fileNamePattern)
283+
.setFileName(actualFileName)
284+
.setFilePattern(fileNamePattern)
285285
.setFilter(fileFilter)
286286
.setImmediateFlush(actualImmediateFlush)
287287
.setLayout(fileLayout)
288288
.setName(name)
289-
.withPolicy(actualTriggeringPolicy)
290-
.withStrategy(rolloverStrategyBuilder.build())
289+
.setPolicy(actualTriggeringPolicy)
290+
.setStrategy(rolloverStrategyBuilder.build())
291291
.build());
292292
}
293293
}

log4j-1.2-api/src/main/java/org/apache/log4j/builders/appender/FileAppenderBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,9 @@ private Appender createAppender(
158158
.setConfiguration(configuration)
159159
.setLayout(fileLayout)
160160
.setFilter(fileFilter)
161-
.withFileName(fileName)
161+
.setFileName(fileName)
162162
.setImmediateFlush(immediateFlush)
163-
.withAppend(append)
163+
.setAppend(append)
164164
.setBufferedIo(bufferedIo)
165165
.setBufferSize(bufferSize)
166166
.build());

log4j-1.2-api/src/main/java/org/apache/log4j/builders/appender/RollingFileAppenderBuilder.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -188,23 +188,23 @@ private Appender createAppender(
188188
final SizeBasedTriggeringPolicy sizePolicy = SizeBasedTriggeringPolicy.createPolicy(maxSize);
189189
final CompositeTriggeringPolicy policy = CompositeTriggeringPolicy.createPolicy(sizePolicy);
190190
final RolloverStrategy strategy = DefaultRolloverStrategy.newBuilder()
191-
.withConfig(config)
192-
.withMax(maxBackups)
193-
.withFileIndex("min")
191+
.setConfig(config)
192+
.setMax(maxBackups)
193+
.setFileIndex("min")
194194
.build();
195195
return AppenderWrapper.adapt(RollingFileAppender.newBuilder()
196196
.setName(name)
197197
.setConfiguration(config)
198198
.setLayout(fileLayout)
199199
.setFilter(fileFilter)
200-
.withAppend(append)
200+
.setAppend(append)
201201
.setBufferedIo(bufferedIo)
202202
.setBufferSize(bufferSize)
203203
.setImmediateFlush(immediateFlush)
204-
.withFileName(fileName)
205-
.withFilePattern(filePattern)
206-
.withPolicy(policy)
207-
.withStrategy(strategy)
204+
.setFileName(fileName)
205+
.setFilePattern(filePattern)
206+
.setPolicy(policy)
207+
.setStrategy(strategy)
208208
.build());
209209
}
210210
}

log4j-1.2-api/src/main/java/org/apache/log4j/builders/layout/HtmlLayoutBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ public Layout parse(final PropertiesConfiguration config) {
7373

7474
private Layout createLayout(final String title, final boolean locationInfo) {
7575
return LayoutWrapper.adapt(HtmlLayout.newBuilder()
76-
.withTitle(title)
77-
.withLocationInfo(locationInfo)
76+
.setTitle(title)
77+
.setLocationInfo(locationInfo)
7878
.build());
7979
}
8080
}

0 commit comments

Comments
 (0)