Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

build:
if: github.actor != 'dependabot[bot]'
uses: apache/logging-parent/.github/workflows/build-reusable.yaml@rel/12.0.0
uses: apache/logging-parent/.github/workflows/build-reusable.yaml@rel/12.1.0
secrets:
DV_ACCESS_TOKEN: ${{ startsWith(github.ref_name, 'release/') && '' || secrets.GE_ACCESS_TOKEN }}
with:
Expand All @@ -41,7 +41,7 @@ jobs:
deploy-snapshot:
needs: build
if: github.repository == 'apache/logging-log4j2' && github.ref_name == 'main'
uses: apache/logging-parent/.github/workflows/deploy-snapshot-reusable.yaml@rel/12.0.0
uses: apache/logging-parent/.github/workflows/deploy-snapshot-reusable.yaml@rel/12.1.0
# Secrets for deployments
secrets:
NEXUS_USERNAME: ${{ secrets.NEXUS_USER }}
Expand All @@ -50,7 +50,7 @@ jobs:
deploy-release:
needs: build
if: github.repository == 'apache/logging-log4j2' && startsWith(github.ref_name, 'release/')
uses: apache/logging-parent/.github/workflows/deploy-release-reusable.yaml@rel/12.0.0
uses: apache/logging-parent/.github/workflows/deploy-release-reusable.yaml@rel/12.1.0
# Secrets for deployments
secrets:
GPG_SECRET_KEY: ${{ secrets.LOGGING_GPG_SECRET_KEY }}
Expand All @@ -68,7 +68,7 @@ jobs:
needs: [ deploy-snapshot, deploy-release ]
if: ${{ always() && (needs.deploy-snapshot.result == 'success' || needs.deploy-release.result == 'success') }}
name: "verify-reproducibility (${{ needs.deploy-release.result == 'success' && needs.deploy-release.outputs.project-version || needs.deploy-snapshot.outputs.project-version }})"
uses: apache/logging-parent/.github/workflows/verify-reproducibility-reusable.yaml@rel/12.0.0
uses: apache/logging-parent/.github/workflows/verify-reproducibility-reusable.yaml@rel/12.1.0
with:
nexus-url: ${{ needs.deploy-release.result == 'success' && needs.deploy-release.outputs.nexus-url || 'https://repository.apache.org/content/groups/snapshots' }}
# Encode the `runs-on` input as JSON array
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ permissions: read-all
jobs:

analyze:
uses: apache/logging-parent/.github/workflows/codeql-analysis-reusable.yaml@rel/12.0.0
uses: apache/logging-parent/.github/workflows/codeql-analysis-reusable.yaml@rel/12.1.0
with:
java-version: 17
# Permissions required to publish Security Alerts
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/deploy-site.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

deploy-site-stg:
if: github.repository == 'apache/logging-log4j2' && github.ref_name == 'main'
uses: apache/logging-parent/.github/workflows/deploy-site-reusable.yaml@rel/12.0.0
uses: apache/logging-parent/.github/workflows/deploy-site-reusable.yaml@rel/12.1.0
# Secrets for committing the generated site
secrets:
GPG_SECRET_KEY: ${{ secrets.LOGGING_GPG_SECRET_KEY }}
Expand All @@ -51,7 +51,7 @@ jobs:

deploy-site-pro:
if: github.repository == 'apache/logging-log4j2' && github.ref_name == 'main-site-pro'
uses: apache/logging-parent/.github/workflows/deploy-site-reusable.yaml@rel/12.0.0
uses: apache/logging-parent/.github/workflows/deploy-site-reusable.yaml@rel/12.1.0
# Secrets for committing the generated site
secrets:
GPG_SECRET_KEY: ${{ secrets.LOGGING_GPG_SECRET_KEY }}
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:

deploy-site-rel:
needs: export-version
uses: apache/logging-parent/.github/workflows/deploy-site-reusable.yaml@rel/12.0.0
uses: apache/logging-parent/.github/workflows/deploy-site-reusable.yaml@rel/12.1.0
# Secrets for committing the generated site
secrets:
GPG_SECRET_KEY: ${{ secrets.LOGGING_GPG_SECRET_KEY }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/merge-dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

build:
if: github.repository == 'apache/logging-log4j2' && github.event_name == 'pull_request_target' && github.actor == 'dependabot[bot]'
uses: apache/logging-parent/.github/workflows/build-reusable.yaml@rel/12.0.0
uses: apache/logging-parent/.github/workflows/build-reusable.yaml@rel/12.1.0
secrets:
DV_ACCESS_TOKEN: ${{ secrets.GE_ACCESS_TOKEN }}
with:
Expand All @@ -39,7 +39,7 @@ jobs:

merge-dependabot:
needs: build
uses: apache/logging-parent/.github/workflows/merge-dependabot-reusable.yaml@rel/12.0.0
uses: apache/logging-parent/.github/workflows/merge-dependabot-reusable.yaml@rel/12.1.0
permissions:
contents: write # to push changelog commits
pull-requests: write # to close the PR
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -401,16 +401,16 @@ public void run() {
break;
}
switch (result.status) {
// These results cause changes in the filter
// We call the listeners
// These results cause changes in the filter
// We call the listeners
case SUCCESS:
case NOT_FOUND:
case EMPTY:
for (FilterConfigUpdateListener listener : listeners) {
listener.onEvent();
}
break;
// These results do no cause changes in the filter
// These results do no cause changes in the filter
case ERROR:
case NOT_MODIFIED:
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,10 @@ public Clock clock(final PropertyEnvironment environment) {
}
return switch (configuration.clock()) {
case "SystemMillisClock" -> logSupportedPrecision(new SystemMillisClock());
case "CachedClock", "org.apache.logging.log4j.core.time.internal.CachedClock" -> logSupportedPrecision(
CachedClock.instance());
case "CoarseCachedClock",
"org.apache.logging.log4j.core.time.internal.CoarseCachedClock" -> logSupportedPrecision(
CoarseCachedClock.instance());
case "CachedClock", "org.apache.logging.log4j.core.time.internal.CachedClock" ->
logSupportedPrecision(CachedClock.instance());
case "CoarseCachedClock", "org.apache.logging.log4j.core.time.internal.CoarseCachedClock" ->
logSupportedPrecision(CoarseCachedClock.instance());
default -> logSupportedPrecision(new SystemClock());
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public void formatTo(final StringBuilder buffer, final Instant instant) {

switch (formatters.size()) {

// If found an empty pattern, return an empty formatter
// If found an empty pattern, return an empty formatter
case 0:
return new AbstractFormatter(pattern, locale, timeZone, ChronoUnit.FOREVER) {
@Override
Expand All @@ -198,11 +198,11 @@ public void formatTo(final StringBuilder buffer, final Instant instant) {
}
};

// If extracted a single formatter, return it as is
// If extracted a single formatter, return it as is
case 1:
return formatters.get(0);

// Combine all extracted formatters into one
// Combine all extracted formatters into one
default:
final ChronoUnit precision = new CompositePatternSequence(sequences).precision;
return new AbstractFormatter(pattern, locale, timeZone, precision) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,16 +117,16 @@ public InstantPatternFormatter build() {
// Wrap the formatter with caching, if necessary
switch (formatter.getPrecision()) {

// It is not worth caching when a precision equal to or higher than microsecond is requested
// It is not worth caching when a precision equal to or higher than microsecond is requested
case NANOS:
case MICROS:
return formatter;

// Millisecond precision cache
// Millisecond precision cache
case MILLIS:
return InstantPatternThreadLocalCachedFormatter.ofMilliPrecision(formatter);

// Cache everything else with second precision
// Cache everything else with second precision
default:
return InstantPatternThreadLocalCachedFormatter.ofSecondPrecision(formatter);
}
Expand Down
10 changes: 0 additions & 10 deletions log4j-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -659,16 +659,6 @@
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerArgs combine.children="append">
<arg>--should-stop=ifError=FLOW</arg>
</compilerArgs>
</configuration>
</plugin>

<!--
~ Some external logging bridges can interfere with our tests, giving false negatives.
-->
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<parent>
<groupId>org.apache.logging</groupId>
<artifactId>logging-parent</artifactId>
<version>12.0.0</version>
<version>12.1.0</version>
<relativePath />
</parent>

Expand Down
Loading